Forum Discussion
YTD Average - DAX calculation
- 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]
Hello,
Expected output is the average of Grade A (Conforme products) / period. (ex. YTD -> From P1 (beginning of the year) until P4 (or now), the average of grade A from P1 to P4 (or now)).
Hope I'm clear
Thanks
Hervé
Anonymous
could you pls provide the real output based on the sample data you provided? It will be better if you can provide the calculation logic as well.
- Anonymous5 years agoNot applicable
Answer should be 88,37 % (average of grade A from P4 & P5).
(Total count OK/(OK + Warning + Non OK)*100
- ryan_mayu5 years ago
Super User
Anonymous
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é