Forum Discussion
Need help in adding a measure
- Anonymous6 years ago
Anonymous
You should unpivot the table to make the dax calculations easy.
1. Go to query editor, hold on Ctrl, select Sale1-7 columns, and unpivot.
2. Close and apply, create the following count measure.
Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table',[Value]="Met"),ALLEXCEPT('Table','Table'[TL]))Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
try this
Measure =
CALCULATE(SUMX(Table, IF([TL Sales Measure] = "Met", 1, 0)), ALLEXCEPT(Table, Table[TL]) )- Anonymous6 years agoNot applicable
Hi
Thanks, but this is giving me the total number of employees. but i need the number of teams for each TL who have achieved the target.
- amitchandak6 years ago
Super User
Anonymous , something like this
if(calculate([EmployeeCount], allexcept(Table, Table[TL])) =0,"",calculate(divide([TargetMetCount],[EmployeeCount]), allexcept(Table, Table[TL]))>10%,"Met","Not Met")
- Anonymous6 years agoNot applicable
Hi
Am not sure if this is counting the number of teams with "Met" for each TL, am getting syntax error occured during parsing.