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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
paultym
New Member

Workaround to use a measure as a slicer

Hi,

 

I have a measure that generates a percentage based on some rules. This is calculated in the section marked with 2, below. The section marked with 1 is for verification purposes. 

Depending on this percentage, a color is assigned to each result, in the last 2 measures in the image below.

Each possibility is calculated in a separate measure: Quadrant Color Blue, Quadrant Color Red, Quadrant Color Yellow, Quadrant Color Green, and then in the measure marked with 2 below, all these possibilities are concatenated.

The same logic is used to generate the text value of the color assigned to a specific percentage and the same logic is used to generate a HEX value of the color assigned to a specific percentage. 

I am using all these to create a scatter chart split in 4.

All these work fine and they are aligned on the chart where they are supposed to be.

The problem is that users need a slicer to filter by just one color. I tried various options to create a column based on the measures, like a disconnected table, switch statements, etc. and nothing seems to work. I either get incomplete values in the slicer or the slicer makes the table blank when used. I've also tried to use the parameter + slicer feature of powerbi and it does absolutely nothing when used.

Any suggestion is greatly appreciated. Thank you

 

percentages.pngworks.png

 

 

5 REPLIES 5
aj1973
Community Champion
Community Champion

Hi @paultym 

Create Table and Rows then load it

aj1973_0-1702941222102.png

Add a calculated column to your new table

aj1973_1-1702941386518.png

Use the new Column from the new Table as a slicer to your visuals

aj1973_2-1702941471462.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi, thank you for your reply but i do not understand how this table is linked to the original data table. My table does not have a column with colors, but a measure. Please explain

aj1973
Community Champion
Community Champion

Hi,

I created a new Table with Column id numerical because thats what I need in my visual to be filtered. I linked the Column id of the new table to my master table via column id as well. That way when I add Color to the visual where there is id in the visual, the filtering by color works as I wanted.

For your exemple, I don't know what column in your visual that is coming from the master table therefore I can't give you the right exemple.

Maybe if you can share a sample of your PBIX I will help you better.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

I see, my main table has millions of rows, i cannot manually connect to a hardcoded ID. thank you for your suggestion though 

aj1973
Community Champion
Community Champion

Millions of rows ! and manually connect to a hardcoded ID !

I don't think you understood my response and how you can apply it to your Model.

A Sample can be only with a table with 10 rows and couple encrypted columns. 

I invite to read this Manually Update Matrix table with forecast - Page 4 - Microsoft Fabric Community

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.