Forum Discussion
Need help with DAX
- Anonymous4 years ago
Hi Avivek ,
According to your screenshot, I think your issue will appear after you add [SET_NAME] from "Set Dim" table into visual. I think this should be caused by ALLEXCEPT() in your data model.
How did you relate "Procedure Fact" and "Tag Usage Fact" table in your data model, by [Tag ID] columns?
I suggest you to try ALL() function and Filter() in your code.
My Sample:
Measure:
Total Procedures = CALCULATE ( SUM ( 'Procedure Fact'[C501B_QTY] ), FILTER ( ALL ( 'Procedure Fact' ), 'Procedure Fact'[TAG_ID] = MAX ( 'Tag Usage Fact'[TAG_ID] ) ) )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Avivek ,
According to your screenshot, I think your issue will appear after you add [SET_NAME] from "Set Dim" table into visual. I think this should be caused by ALLEXCEPT() in your data model.
How did you relate "Procedure Fact" and "Tag Usage Fact" table in your data model, by [Tag ID] columns?
I suggest you to try ALL() function and Filter() in your code.
My Sample:
Measure:
Total Procedures =
CALCULATE (
SUM ( 'Procedure Fact'[C501B_QTY] ),
FILTER (
ALL ( 'Procedure Fact' ),
'Procedure Fact'[TAG_ID] = MAX ( 'Tag Usage Fact'[TAG_ID] )
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.