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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
imaddrell
Advocate I
Advocate I

Help with an average measure excluding value

Hi

 

I was wondering if someone could help me? I have a score created through a measure, shown by day. This works fine. I can show the measure in a table of days and this gives me a rating per day and an average over a period of time.

 

But, if the value on a given day falls below a certain rating (20) I would like to exclude this from the average. The data containing the 20 does not exist as a column as it is a measure divised by day over a time period. This is my measure for the average:

 

Day Average = AVERAGEX(VALUES(DateKey[Date]),[Score])

 

I would like it to only considers score of above the level of 20 per day for the average, the [Score] is a measure and not a column.

 

Any help would be much appreciated.

 

Thanks

Ian

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@imaddrell

 

Try with following

 

Day Average =
AVERAGEX ( FILTER ( VALUES ( DateKey[Date] ), [Score] > 20 ), [Score] )

 

 


Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@imaddrell

 

Try with following

 

Day Average =
AVERAGEX ( FILTER ( VALUES ( DateKey[Date] ), [Score] > 20 ), [Score] )

 

 


Regards
Zubair

Please try my custom visuals

That works brilliantly, thanks very much!!

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.