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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
anwarbi
Helper III
Helper III

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
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.