Forum Discussion
KPI Card cannot show YTD
- Anonymous2 years ago
Hi Anonymous ,
Based on my testing, please try the following methods:
1.Create the sample table.
2.Create the measure to calculate kpi values.
KPI = var _numer = SUMX('Table', 'Table'[NUMERATOR]) var _de = SUMX('Table', 'Table'[DENOMINATOR]) RETURN DIVIDE(_numer, _de)3.Drag the measure into the card visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , Try using below method
Create a measure for the cumulative sum of the numerator:
Cumulative Numerator =
CALCULATE(
SUM(G[NUMERATOR]),
FILTER(
ALLSELECTED(G),
G[Date] <= MAX(G[Date])
)
)
Create a measure for the cumulative sum of the denominator:
Cumulative Denominator =
CALCULATE(
SUM(G[DENOMINATOR]),
FILTER(
ALLSELECTED(G),
G[Date] <= MAX(G[Date])
)
)
Create the KPI value measure using the cumulative sums:
KPI VALUE =
DIVIDE(
[Cumulative Numerator],
[Cumulative Denominator]
)
ALLSELECTED(G) ensures that the calculation respects the current context of filters applied in your report.