Forum Discussion
If-Then Measure doesn't total correctly
- 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.
Hi jenneferparr ,
Can you share the entire screen shot.
Not very clear as to what happened.
Also share a sample file if possible.
Regards,
HN
Here is the full matrix:
and here is the measure with your changes:
Maybe I mistyped something? Unfortunately I can't share the file for confidentiality reasons.
The two tables included in these measures are related one-to-many on LOADID.
- v-xicai6 years ago
Community Support
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.
- jenneferparr6 years ago
Helper I
Thank you, v-xicai ! That solved it!