Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 |
Solved! Go to Solution.
@Anonymous , Try Like
measure =
divide(COUNTX(filter(Values(Table[month]), Table[Value]>=200),CALCULATE(sum(Table[Value]))),CALCULATE(COUNT(Value)))
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.
@Anonymous , Try Like
measure =
divide(COUNTX(filter(Values(Table[month]), Table[Value]>=200),CALCULATE(sum(Table[Value]))),CALCULATE(COUNT(Value)))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |