Forum Discussion
Aggregated Value in KPI
Hello!
I would like to develop some KPI visuals that shows both the breakdown each month, and the entire calculation as a number (like a card). I'd like to essentially combine a card visual with a line visual. I already know how to use the KPI Indicator visual, but unfortuantely the only aggregation types available (in the card part) are: Last Value, Average, and Sum. What happens if I want to show (CALCULATE(COUNT(Value), Value>=200))/(CALCULATE(COUNT(Value)) broken down by month on a line chart and not broken up by month (aggregated by my calculation) as the value all in one visual? I hope this makes sense and isn't convoluted, but I can explain further if this doesn't make sense or needs some clarification.
Thank you!
| Month | Value |
| Dec-20 | 150 |
| Dec-20 | 160 |
| Dec-20 | 200 |
| Jan-21 | 10 |
| Jan-21 | 180 |
| Jan-21 | 200 |
| Jan-21 | 500 |
| Feb-21 | 150 |
| Feb-21 | 200 |
Anonymous , Try Like
measure =
divide(COUNTX(filter(Values(Table[month]), Table[Value]>=200),CALCULATE(sum(Table[Value]))),CALCULATE(COUNT(Value)))
2 Replies
- amitchandakSuper User
Anonymous , Try Like
measure =
divide(COUNTX(filter(Values(Table[month]), Table[Value]>=200),CALCULATE(sum(Table[Value]))),CALCULATE(COUNT(Value))) - AnonymousNot applicable
Hi Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
Month1 = MONTH('Table'[Month])2. Create measure.
Measure = var _200=CALCULATE(COUNT('Table'[Value]),FILTER(ALL('Table'),'Table'[Month1]=MAX('Table'[Month1])&&'Table'[Value]>=200)) var _all=CALCULATE(COUNT('Table'[Value]),FILTER(ALL('Table'),'Table'[Month1]=MAX('Table'[Month1]))) return DIVIDE(_200,_all)3. Result:
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.