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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
salabb
Regular Visitor

How to use a measure to aggregate KPIs

Hello,

 

in my current PBI project, I have created a measure called as "last_month_flag" which, according to time filters, will output "Yes" if the month in 2023 is the last selected one, else "No". 

 

salabb_0-1693315759634.png

 

Now I would like to use this last_month_flag measure to aggregate KPIs, in particular to AVERAGE those months flagged as "No" to quickly compare vs last selected month. Is there a way to do this?

 

Any idea or suggestion would be much appreciated. 😊

 

Many thanks,

salabb

2 REPLIES 2
technolog
Super User
Super User

I hope this message finds you well. I've noticed that this solution remain unresolved. If any of you have managed to find a resolution to the issue, I kindly request that you share your solution for the benefit of the entire community. Alternatively, if you're still facing challenges, please do let us know as well.

Your insights and updates will greatly assist others who might be encountering the same challenge.

DataNinja777
Super User
Super User

Hi salabb,

 

Although I don't know what table and column you want to get the average, something like below may work.

Average of non-last month =
CALCULATE ( AVERAGE ( 'Table'[Amount] ), [last_month_flag] = "No" )

 

 

 

Average of non-last month =
CALCULATE ( AVERAGE ( 'Table'[Amount] ), [last_month_flag] = "No" )

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.