Forum Discussion
jenneferparr
Helper I
6 years agoIf-Then Measure doesn't total correctly
I have a table where I've created 3 measures to calculate a 4th measure using an if statement. I have two problems but specifically need help getting that if statement to total correctly. Here are m...
- 6 years ago
Hi jenneferparr ,
You may create a new measure like DAX below, assuming the field in Rows box of Matrix visual is Table1[Product ID].
CALCBF_New = VAR _table = SUMMARIZE ( Table1, Table1[Product ID], "_Value", [CALCBF] ) RETURN IF ( HASONEVALUE ( Table1[Product ID] ), [CALCBF], SUMX ( _table, [_Value] ) )Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xicai
Community Support
6 years agoHi jenneferparr ,
You may create a new measure like DAX below, assuming the field in Rows box of Matrix visual is Table1[Product ID].
CALCBF_New =
VAR _table =
SUMMARIZE ( Table1, Table1[Product ID], "_Value", [CALCBF] )
RETURN
IF ( HASONEVALUE ( Table1[Product ID] ), [CALCBF], SUMX ( _table, [_Value] ) )
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jenneferparr
Helper I
6 years agoThank you, v-xicai ! That solved it!