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

Compare one with average of multiple

Hi Experts,

I am failry new to PowerBI and need some help. I am trying to compare value of one customer to the average of the same value of a multiple customers.

Sample Data:

Year   Customer  ProductPurchased

2016   A               225

2016   B               200

2016   C               25

2016   D              100

2015   A               158

2015   B               150

2015   C               30

2015   D              90

 

I should be able to pick a Year (Slicer 1) and then pick a customer (Slicer 2) and compare the ProductPurchased by that customer to Average of ProductPurchased for customerS picked in (Slicer 3, say, for e.g. Customers C and D). For average, the customers will be dynamically selected. I was only able to to add a measure to calculate average for all customers, but I need to compare one customer's ProductPurchased with average of multiple customerS (not all). Any help is greatly appreciated. Thanks a lot!

 

1 ACCEPTED SOLUTION

@ace_SB

 

Please see the attached file

 

compet.png


Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

Hi @ace_SB

 

First create a New Table (This will be used as Slicer for Competitor Products)

 

From the Modelling Tab>>NEW Table

 

Competitors =
ALL ( Table1[Customer] )

Now we can use this MEASURE in your Table (say Table1)

 

Average Of Competitors =
CALCULATE (
    AVERAGE ( Table1[ProductPurchased] ),
    TREATAS ( VALUES ( 'Competitors'[Customer] ), Table1[Customer] )
)

Regards
Zubair

Please try my custom visuals

@ace_SB

 

Please see the attached file

 

compet.png


Regards
Zubair

Please try my custom visuals

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.