Forum Discussion
s_mccafferty
7 years agoFrequent Visitor
DAX: Calculate Percentages
I have a data model similar to the below: Building Occupier Area building 1 occupier1 10000 building 1 occupier 2 15000 building 2 occupier 3 10000 building 3 occupier 4 10000 building 3 occu...
- 7 years ago
Hi s_mccafferty ,
Here we can create a measure to work on it.
Measure = VAR oc = CALCULATE ( SUM ( Table1[area] ) ) VAR al = CALCULATE ( SUM ( Table1[area] ), ALL ( Table1 ), VALUES ( Table1[Building] ) ) RETURN DIVIDE ( oc, al )Pbix as attached.
Regards,
Frank
v-frfei-msft
Community Support
7 years agoHi s_mccafferty ,
Here we can create a measure to work on it.
Measure =
VAR oc =
CALCULATE ( SUM ( Table1[area] ) )
VAR al =
CALCULATE ( SUM ( Table1[area] ), ALL ( Table1 ), VALUES ( Table1[Building] ) )
RETURN
DIVIDE ( oc, al )
Pbix as attached.
Regards,
Frank
- s_mccafferty7 years agoFrequent Visitor
v-frfei-msft Perfect, thank you.
- ninalee7 years ago
Helper I
thnx, very helpful