Forum Discussion
Anonymous
5 years agoNot applicable
YTD Average - DAX calculation
Dear all, I'm trying to calculate the YTD Average value - but I would need your help on this KPI & DAX language. Data are like this: -> Conformity level (Grade A = OK/NON OK per scan/factory/etc.)...
- 5 years ago
Anonymous
pls try this
Measure = DIVIDE(CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[CONFORMITY]="OK")),COUNTROWS('Table')) - 5 years ago
Anonymous
pls change year to rclms_qa[year]
Anonymous
5 years agoNot applicable
Answer should be 88,37 % (average of grade A from P4 & P5).
(Total count OK/(OK + Warning + Non OK)*100
ryan_mayu
Super User
5 years agoAnonymous
pls try this
Measure = DIVIDE(CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[CONFORMITY]="OK")),COUNTROWS('Table'))
- Anonymous5 years agoNot applicable
Thanks a lot for you help. Can we specify in this formula, that I would need the % for this year (2021)?
Then I can make the same calculation for 2020 (it will be my objective) and build a KPI.
Best regards
Hervé
- ryan_mayu5 years ago
Super User
Anonymous
you can try this and change 2021 to 2020 to get 2020KPI
Measure = DIVIDE(CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[CONFORMITY]="OK"&year=2021)),CALCULATE(COUNTROWS('Table'),FILTER('Table',year=2021)
- Anonymous5 years agoNot applicable
Hello
Thanks for your reply.
I tried the formula but I have an error:
Do you know why?
Thanks
Hervé