- Home /

Hi, all! I have an issue with wrong grand total for calculating measure in DAX. The measure calculates depends of different measure and show it's positive values only: Measure2 = IF(Measure1 > 0, Measure1, NULL) Unfortunately, it doesn't add up correctly the grand total: ![alt text][1] Grand Total (Measure2): 30 <-- wrong value, it should be 100 Because the grand total in DAX calculated as: IF(50 - 10 + 20 - 60 + 30 > 0, 50 - 10 + 20 - 60 + 30, NULL) Is there any way to calculate the grand total in the right way? [1]:
https://cdn-standard.discourse.org/uploads/sqlteam/original/2X/a/aa124ccd58c2a2ed000b074c2b8bdb528acbdcf9.png

Comment

**Answer** by tzvikl
·
Jun 14, 2017 at 09:53 AM

Hi there, Perhaps try changing your measure definition to use the SUMX function, that way the calculation will execute by iterating over the table row by row, try something like this: Measure2 = SUMX(, If(Measure1>0,Measure1 , Null) )

ssas tabluar memory issue 0 Answers

Easily add descriptions to Tabular dim/measure groups etc 0 Answers

SSAS Cube 0 Answers

SSAS Tabular Mode Encryption 0 Answers

DAX Row filter expression 1 Answer

Copyright 2019 Redgate Software. Privacy Policy

- Anonymous
- Sign in
- Create
- Ask a question
- Spaces
- Ask SSC Site Issues (meta-askssc)
- Explore
- Topics
- Questions
- Users
- Badges