Forum Discussion
Largefinger
4 years agoFrequent Visitor
Calculating Measures Totals after if statement
Hi All, I need some help with this dax measure. I am passing data through an if statement and getting the correct result at the row level, however, I can not work out how to calculate the total...
- 4 years ago
Largefinger
4 years agoFrequent Visitor
Legend... thanks heaps for the assistance, that one was doing my head in👍
Just to complete the post, the solution was to break the measure down into an if statement and then use a sumx in another measure.
SC - Condition - Tons achieved in planned location =
var actual = [Total Ore Hauled to ROM Actual (t)]
var planned =[P1 Total Ore Hauled to ROM Planned]
return if([planned]>0,if([actual]>=[planned],[planned],[actual]))SC - Tons achieved in planned location =
SUMX(VALUES(Locations[LocationCode]),'Actuals -Webbar'[SC - Condition - Tons achieved in planned location])
- Ashish_Mathur4 years ago
Super User
You are welcome.