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
Anonymous
Not applicable

How can I use a measures output as a slicer ?

Hi, is it possible to use a measure's output as a filter? In my model, depending on how many sales an employee has of a certain product in a specified time period determines the type of sales rep that the employee is, so this is why I have to use a measure to calculate what type of sales rep the employee is. Below the measure that I am currently using to calculate what type of sales rep they are: 

 

 

Sales Rep Type = 
Switch(
     True(),
     [Sports_Rep] > .4, "Sports Rep",
     [Family_Rep] >.4, "Family Rep", 
     [First_Time_Rep] >.4, "1st Time Buyer Rep",
     "General") 

 

 

 Where [Sports_Rep] is a measure that calculates the percentage of total sales that were dedicated to sports - if that measure is greater than .4, then that employee is a "Sports Rep" 

 

Does anyone have any ideas on how to make the "Sports Rep", "Family Rep", "1st Time Buyer Rep" and "General" into a slicer that I can use to change the data on the report? 

 

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

Hi @Anonymous ,

 

Measure can't be used as page-level filter. I suggest create another table:

 

Capture.PNG

 

Use it as slicer, and put filter: xxxxx = SELECTEDVALUE('Table'[Column]) in all visuals in your report.

 

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

 

Best Regards,

Dedmon Dai

 

 

 

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

I'd like to help.  Share some data that can be copied into an MS Excel file or share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Ashish, 

I have attached a github link for a power bi file that describes the problem I am having. 

 

https://github.com/Zar117/Power-BI-Rank-Based-On-Switch-Measure 

 

Thank you for willing to help out 

 

@Ashish_Mathur @v-deddai1-msft 

v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

Measure can't be used as page-level filter. I suggest create another table:

 

Capture.PNG

 

Use it as slicer, and put filter: xxxxx = SELECTEDVALUE('Table'[Column]) in all visuals in your report.

 

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

 

Best Regards,

Dedmon Dai

 

 

 

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.