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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
JimArce
Frequent Visitor

Use slicer such as toggle, create a dinamic meassure and format numbers with colors

I am using a slicer such a toggle, and create a Dynamic meassure to change unit of meassure on same table to show data in percentage or dollars (depends on toogle). All is working good, Chek picture below.

 

JimArce_0-1697853160271.png

 

 

But I need to add a function in the Dynamic meassure to create a conditional formating. When amount is greater than $50k get font in red for both dollars and percentage, it doesn't matter which one is presented in the table in that moment. See picture below, those numbers with red line are needed in red font

 

JimArce_1-1697852818929.png

 

 

 

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @JimArce 
You don't need a new measure, just use your [tot usd] as a condition.
For example, in my picture, the values are percentages and conditions based on total sales without putting it in the table.

Ritaf1983_0-1697858616446.png

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Hi @JimArce 
O meant that you don't need a measure for "coloring".
The measure that the condition is based on... doesn't have to appear in the table.
Please note that in the attached picture you see percentages, but conditions based on Total sales.
Your measure is OK, you can use the "tot USD" in your case for the condition and continue to use the dynamic measure that you created to switch the values as you need.

I prepared PBIX with an example of a scenario like yours, you can download it and check by yourself.

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

4 REPLIES 4
Ritaf1983
Super User
Super User

Hi @JimArce 
You don't need a new measure, just use your [tot usd] as a condition.
For example, in my picture, the values are percentages and conditions based on total sales without putting it in the table.

Ritaf1983_0-1697858616446.png

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

The measure is needed because the toggle is needed. The google shows data in $ or % using just one table.

Hi @JimArce 
O meant that you don't need a measure for "coloring".
The measure that the condition is based on... doesn't have to appear in the table.
Please note that in the attached picture you see percentages, but conditions based on Total sales.
Your measure is OK, you can use the "tot USD" in your case for the condition and continue to use the dynamic measure that you created to switch the values as you need.

I prepared PBIX with an example of a scenario like yours, you can download it and check by yourself.

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

What about if I need a stacked bar, I mean I need to have a decomposition of that meassure.

Can you suggest to me something?

JimArce_0-1698260072682.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors