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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
hoosha_11
Helper I
Helper I

Custom Pass/Fail Thresholds in Power BI Table Visuals

Hi,

 

We have a table visual with a 'Score' column. If the score is greater than 80, it's considered a 'Pass' with a green background; if it's less than 80, it's marked as 'Fail' with a red background. But, users should be able to set their own pass/fail % limit. For example, if someone sets the limit to 60%, then any score below 60% should display in red. Is there a way to achieve this in Power BI?

 

Thanks!

2 ACCEPTED SOLUTIONS
parry2k
Super User
Super User

@hoosha_11 add at the source (in the semantic model)



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

v-zhouwen-msft
Community Support
Community Support

Hi @parry2k ,thanks for the quick reply, I'll add further.

Hi @hoosha_11 ,

I noticed that your connection mode is Live connection, maybe you can use the conditional format.

The Table data is shown below:

vzhouwenmsft_0-1714023012346.png

Please follow these steps:
1. Use the following DAX expression to create a measure(The user can just change the score in the expression)

 

Measure = IF(SELECTEDVALUE('Table'[Score]) >= 80 ,"Pass","Fail")

 

 2.Use the following DAX expression to create a measure

 

Measure 2 = IF([Measure] = "Fail","RED","GREEN")

 

3.Setting the Conditional Format

vzhouwenmsft_1-1714023227988.png

vzhouwenmsft_2-1714023251247.png

4.Final output

vzhouwenmsft_3-1714023279641.png

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

 

 

Best Regards,
Wenbin Zhou
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

4 REPLIES 4
v-zhouwen-msft
Community Support
Community Support

Hi @parry2k ,thanks for the quick reply, I'll add further.

Hi @hoosha_11 ,

I noticed that your connection mode is Live connection, maybe you can use the conditional format.

The Table data is shown below:

vzhouwenmsft_0-1714023012346.png

Please follow these steps:
1. Use the following DAX expression to create a measure(The user can just change the score in the expression)

 

Measure = IF(SELECTEDVALUE('Table'[Score]) >= 80 ,"Pass","Fail")

 

 2.Use the following DAX expression to create a measure

 

Measure 2 = IF([Measure] = "Fail","RED","GREEN")

 

3.Setting the Conditional Format

vzhouwenmsft_1-1714023227988.png

vzhouwenmsft_2-1714023251247.png

4.Final output

vzhouwenmsft_3-1714023279641.png

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

 

 

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

parry2k
Super User
Super User

@hoosha_11 add at the source (in the semantic model)



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@hoosha_11 use what-if parameters to achieve this? let user pick the value in the what-if parameters and based on the selection set the green/red colors. Use parameters to visualize variables - Power BI | Microsoft Learn



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks a lot! I just checked and since there is a live connection to the semantic model for each report, the what-if parameter is grayed out. Are there any workarounds to use this option?

 

hoosha_11_0-1713896410458.png

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.