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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MBog
Regular Visitor

Gauge with average results

Hi! I am asking for somebody's advice.

 

How can I write a measure which gives me the overall average of the whole category to which the selected customer belongs?
Select month, Customer1, it has categoy BV, so I need the average value for the whole category not just for Customer1 within the selected month.

MonthCodeCustomerVendor categoryValue
JULY111Customer1BV45.40%
JULY112Customer2BV58.80%
JULY113Customer3BV46.70%
JULY114Customer4AC23.50%
JULY115Customer5AC60.00%
JULY116Customer6AC60.80%
AUGUST111Customer1BV58.50%
AUGUST112Customer2BV60.30%
AUGUST113Customer3BV65.70%
AUGUST114Customer4AC50.70%
AUGUST115Customer5AC62.30%
AUGUST116Customer6AC34.50%

 

Selected Month AUG
Selected customer Customer1
Value 58.50%
Category Average 61.50%

Category average is total Customer1,2,3 for BV category in this case

 

I tried it many ways but still not working....I would like to use it in a gauge chart as target.

 

Thank you in advance!

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @MBog 

Please create a new measure:

Category Average = 
CALCULATE(
    AVERAGE('Table'[Value]),
    FILTER(
        ALL('Table'),
        'Table'[Vendor category] IN VALUES('Table'[Vendor category])
            && 'Table'[Month] IN VALUES('Table'[Month])
    )
)

vcgaomsft_0-1696238507369.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
MBog
Regular Visitor

Thanks Gao, this is exactly what I need. I was overcomplicated the measure, but yours helped!

v-cgao-msft
Community Support
Community Support

Hi @MBog 

Please create a new measure:

Category Average = 
CALCULATE(
    AVERAGE('Table'[Value]),
    FILTER(
        ALL('Table'),
        'Table'[Vendor category] IN VALUES('Table'[Vendor category])
            && 'Table'[Month] IN VALUES('Table'[Month])
    )
)

vcgaomsft_0-1696238507369.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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