Forum Discussion
Roskalnikov
3 years agoFrequent Visitor
Writing Dax for Percentages based on Conditions
Hi everyone, I'm having trouble figuring out the apporpirate formula to calculate the below: (Sum of number of practitioners for year ranges < 1 year and 1-5 years)/(Sum of number of practitio...
- 3 years ago
Hi Roskalnikov,
You could use SUMX and DIVIDE. Create a new measure as follows.
Measure =
VAR _Group1 = SUMX( FILTER(Table, Table[Years Intended to Work] <= 5), Table[Number of Practitioners])VAR _Group2 = SUMX( FILTER(Table, Table[Years Intended to Work] > 5 ), Table[Number of Practitioners])VAR _Division = DIVIDE( _Group1, _Group2)RETURN_Division * 100
Hope this helps!
ovde
Resolver II
3 years agoHi Roskalnikov,
You could use SUMX and DIVIDE. Create a new measure as follows.
Measure =
VAR _Group1 = SUMX( FILTER(Table, Table[Years Intended to Work] <= 5), Table[Number of Practitioners])
VAR _Group2 = SUMX( FILTER(Table, Table[Years Intended to Work] > 5 ), Table[Number of Practitioners])
VAR _Division = DIVIDE( _Group1, _Group2)
RETURN
_Division * 100
Hope this helps!