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

Filter table rows by conditional formatting value

Hello,

I have the following table where the remaining amount is flagged by colour according to the following rules:

1. If invoice amount is less than 50% of total value = green

2. If invoice amount is between 50% and 90% of total value = yellow

3. If invoice amount is 90% or higher of total value = red

 

I am using this measure as the conditional formatting of the "Remaining amount" column:

 

Icon flag = 
VAR _Threshold =
    DIVIDE ( [Invoice amount] , 'Table'[Total amount] )
RETURN
    SWITCH ( TRUE (), 
_Threshold < 0.5, 1, 
_Threshold < 0.9, 2, 
3 )

 

MakeItReal_0-1660334176404.png

I am trying to make a slicer to filter the table rows according to the circle colours. Is that possible? Any help is much appreciated!

The download link to my PBIX file: https://drive.google.com/file/d/11QTOsJNZWgRtPqnQk--gK46bEp5bEk3d/view?usp=sharing

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

Try this

 

Create a pick list table

Add a slicer

Aabd drag the RAG colour fields to the slicer

 

speedramps_0-1660385983391.png

 

Create measure

RAG valid = IF([Icon flag] IN VALUES(RAGS[RAG ID]) ,1)

 

Click on your reort visual and add this filters

RAG valid = 1

 

speedramps_1-1660386383208.png

 

 

Thanks for reaching out for help.

I put in a lot of effort to help you, now please quickly help me by giving kudos.

Remeber we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button. 

If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime.  I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

 

View solution in original post

3 REPLIES 3
speedramps
Super User
Super User

Try this

 

Create a pick list table

Add a slicer

Aabd drag the RAG colour fields to the slicer

 

speedramps_0-1660385983391.png

 

Create measure

RAG valid = IF([Icon flag] IN VALUES(RAGS[RAG ID]) ,1)

 

Click on your reort visual and add this filters

RAG valid = 1

 

speedramps_1-1660386383208.png

 

 

Thanks for reaching out for help.

I put in a lot of effort to help you, now please quickly help me by giving kudos.

Remeber we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button. 

If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime.  I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

 

Thank you so much for your efforts and solution!

Anonymous
Not applicable

@speedramps Thanks for your reply! It works. But i am wondering if it is possible to adapt this method to sort the rows based on the icon flag value or RAG ID, instead of filtering? If it is possible, then i will create another ticket for this question.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.