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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Need help with Conditional Formatting based on dynamic threshold values

PBI SAMPLE FILE ATTACHED 

I have visual 1 and visual 2.  When I select a country in Visual 1, Visual 2 shows data for that country.

I want  a conditional formatting in Visual 2 to highlight ‘Subjects’ Or ‘Average of Marks’ where ‘Average Of Marks’ is below PassingGrade for that Country.

For example If I select Japan in Visual 1, Math and Physics in Visual 2 should get highlighted on the basis of ‘Threshold for Reference’ table

guptav13_0-1661945308336.png

 

But If I select Singapore in visual 1 , Physics should get highlighted on the basis of ‘Threshold for Reference’ table

guptav13_1-1661945374872.png

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the attached file.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

8 REPLIES 8
Jihwan_Kim
Super User
Super User

Hi,

Please check the attached file.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Anonymous
Not applicable

Big thanks, this works!!

Is there a way to highlight them with Red flags like below instead of background color?

If you could share the file or code snippet to do that would be great!

 

guptav13_0-1661951022738.png

 

Hi,

I wrote a bit more detail about explaining how the measure works in the link down below.

 

https://jihwankimcscp.wixsite.com/supplychainflow/post/conditional-formatting-in-matrix-table-visual...

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Hi,

Thank you for your feedback.

I amended the measure, and now it show a flag based on the condition.

Please check the attached file if it suits your requirement.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Anonymous
Not applicable

Hi, Can you share the power Bi file?

Did you join the Passing Score and Sheet 2 tables? Will this work dynamicaly if I selecting different countries in Visual 1

Anonymous
Not applicable

Yes, I did join the two tables on Country. And it will work dynamically.

Anonymous
Not applicable

Hi , I tried replicating your approach as it is simplete but it is not working correcly, Check below for instance. THis should have highlighted Math as well? I think Test measure need to be tweaked a little bit. You are using Sum, and not average there, why?

guptav13_0-1661950450375.png

 

Anonymous
Not applicable

Hi,

I made a measure to use for conditional formatting called "test" :

PowerUserR_0-1661948894600.png

PowerUserR_3-1661949005866.png

 

PowerUserR_2-1661948947876.png

 

I hope that solved the issue 🙂

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors