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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.