1

I have to replace the negative values with 0 in Running sum field.

I have created a calculation, like this

IF SUM([Sales]) < 0 THEN 0 ELSE RUNNING_SUM(SUM([Sales])) END

Table calculation using "Across". But I am not getting expected result.

enter image description here

I should get the results like this: enter image description here

1
  • 1
    You can simplify the expression slightly as RUNNING_SUM(MAX(0, SUM([Sales])). And you also need to set the partitioning/addressing aka "compute using" settings as desired, just as for any table calc. Commented Mar 8, 2024 at 22:28

1 Answer 1

1

You're very close, calculate Down the table rather than Across it.

See how to transform Table Calculations in the Tableau Documentation.

Also see the Running Sum Calculation Documentation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.