cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
anwarbi
Helper II
Helper II

Measure that responds to slicer

Hi,

I have created the below measure,  so that if i select  a 'vendor name' from the drop down slicer, it should subtract the average score (of the selected vendor from the slicer) from the peer average score (the second part of the measure which adds a filter of related peers- which are also a group of vendors).

 

The result that i am getting however is incorrect as it only gives me the average score of the selcted vendor in the output and does not consider subtractraction. 

 

I think this measure needs to add some variable in the begining so that the measure responds to the selected vendor from the slicer. 

 

Score deviation with peer avg. = AVERAGE(Sheet1[Score])- (CALCULATE(AVERAGE(Sheet1[Score]), Sheet1[related Peers]<>""))
 
Your help will be appreciated.
1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @anwarbi ,

 

Try to create a measure like below:

Measure = 
var peer_ = CALCULATE(AVERAGE('Table'[value]),ALLEXCEPT('Table','Table'[peer]))
var vendors_ = AVERAGE('Table'[value])
return peer_-vendors_

Vlianlmsft_0-1638511273526.png

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @anwarbi ,

 

Try to create a measure like below:

Measure = 
var peer_ = CALCULATE(AVERAGE('Table'[value]),ALLEXCEPT('Table','Table'[peer]))
var vendors_ = AVERAGE('Table'[value])
return peer_-vendors_

Vlianlmsft_0-1638511273526.png

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

jppv20
Solution Sage
Solution Sage

Hi @anwarbi ,

 

Can you provide some sample data and the desired output?

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors