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]
ryan_mayu
Super User
5 years agoAnonymous
could you pls provide the expected output?
- Anonymous5 years agoNot applicable
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é
- ryan_mayu5 years ago
Super User
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