Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

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!

 

MonthValue
Dec-20150
Dec-20160
Dec-20200
Jan-2110
Jan-21180
Jan-21200
Jan-21500
Feb-21150
Feb-21200
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try Like

 


measure =
divide(COUNTX(filter(Values(Table[month]), Table[Value]>=200),CALCULATE(sum(Table[Value]))),CALCULATE(COUNT(Value)))

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

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:

v-yangliu-msft_0-1614904898678.png

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.

amitchandak
Super User
Super User

@Anonymous , Try Like

 


measure =
divide(COUNTX(filter(Values(Table[month]), Table[Value]>=200),CALCULATE(sum(Table[Value]))),CALCULATE(COUNT(Value)))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors