Forum Discussion
Dax not returning a value
- 4 years ago
I changed this
IF( MAX(Machine[Display])="Precision"
,CALCULATE(SUM(Manufacturing[TonnesMade]),Machine[Alt Name] IN {"MA","MB","MC","MD"})
,CALCULATE( SUM(Manufacturing[TonnesMade])))
To
IF( MAX(Machine[Display])="Precision"
,CALCULATE(SUM(Manufacturing[TonnesMade]),Machine[Alt Name] IN {"MA","MB","MC","MD"},allexcept(Machine,Machine[Alt Name]))
,CALCULATE( SUM(Manufacturing[TonnesMade])))
It now works as I required.I will be the first to acknowledge I have no idea what the allexcept is acually doing.
Thanks for looking at this for me.
David01 , can share some visual screen shot. the above should work
Try this too
CALCULATE(SUM(Manufacturing[TonnesMade]),Filter(Machine, Machine[Alt Name] IN {"MA","MB","MC","MD"}) )
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
I changed this
IF( MAX(Machine[Display])="Precision"
,CALCULATE(SUM(Manufacturing[TonnesMade]),Machine[Alt Name] IN {"MA","MB","MC","MD"})
,CALCULATE( SUM(Manufacturing[TonnesMade])))
To
IF( MAX(Machine[Display])="Precision"
,CALCULATE(SUM(Manufacturing[TonnesMade]),Machine[Alt Name] IN {"MA","MB","MC","MD"},
)
,CALCULATE( SUM(Manufacturing[TonnesMade])))
It now works as I required.
I will be the first to acknowledge I have no idea what the allexcept is acually doing.
Thanks for looking at this for me.