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
justnoob08
Frequent Visitor

I wanted to get the Average of a Measure used as Values and Display in a Card

I have a measure called SumOfMonth and it is the Sum of 2 other Measures.

I have a Matrix Table that uses Months for Row and is filtered by a slicer. I wanted to get the Average of SumOfMonth and Display it on a Card,

 

My Initial thought is to use Average and put the Measure name but it doesn't accept it. I'm really new to DAX and I can't figure out how to achieve this.

 

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@justnoob08 

 

If you create a measure:

[Avg of SumOfMonth] =
AVERAGEX(
    DISTINCT( T[Month] ),
    [SUMMonth]
)

 it'll do what you want. If, for instance, you put it on the matrix, for each individual month it'll display [SUMMonth] and the total row will show you the average across the months in the matrix. Put the measure on a card and you'll get the average as well.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@justnoob08 

 

If you create a measure:

[Avg of SumOfMonth] =
AVERAGEX(
    DISTINCT( T[Month] ),
    [SUMMonth]
)

 it'll do what you want. If, for instance, you put it on the matrix, for each individual month it'll display [SUMMonth] and the total row will show you the average across the months in the matrix. Put the measure on a card and you'll get the average as well.

Thank you so much @Anonymous it worked liked a charm!

justnoob08
Frequent Visitor

@amitchandak 

Below is my Sample, apologies I can't share a PBIX, So I added the measure Escalweight and Challengeweight to get SUMmonth then I wanted to display 2.25 as the average on a card.

Hope this is clear.

justnoob08_0-1614078950582.png

 

amitchandak
Super User
Super User

@justnoob08 ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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