Forum Discussion
Anonymous
5 years agoNot applicable
DAX with multiple filters and multiplication
Hi all.
I need to create a measure where a sum of two location : 1) Penang, 2) Japan, are sum up together and multiply with value 88. There are also a restriction/filter where the category must be RM.
I've tried this formula :
Cost_Saving_JPN = CALCULATE(SUMX('Actual Data',[Actual Hours]),FILTER('Actual Data', 'Actual Data'[Position] = "RM" && 'Actual Data'[Project Location]= "Penang" && 'Actual Data'[Project Location] = "Japan")) * 88
But the output becomes blank. If I use below formula, then the output is there.
Cost_Saving_JPN = CALCULATE(SUMX('Actual Data',[Actual Hours]),FILTER('Actual Data', 'Actual Data'[Position] = "RM" && 'Actual Data'[Project Location] = "Japan")) * 88
Please enlighten me on this. Thank you!
In your first expression, a single column cannot be two values at the same time, so it is blank. You need to use OR() or || or you can use an IN expression like.
'Actual Data'[Project Location] in {"Penang", "Japan"}
Pat
1 Reply
- mahoneypat
Microsoft Employee
In your first expression, a single column cannot be two values at the same time, so it is blank. You need to use OR() or || or you can use an IN expression like.
'Actual Data'[Project Location] in {"Penang", "Japan"}
Pat