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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
nabandla
Helper I
Helper I

Measure Use in Custom Formatting

HI @All,


I have created table Visual

with Sub-Category and Sales

and Created a DAX Measure  = IF(SUM(Sales)>=POWER(10,5),TRUE(),FALSE())

wanted to use this Measure in Conditional Formatting -->

nabandla_0-1721802428481.png

 

nabandla_1-1721802462148.png

When i am tryig apply based on Field Value
its not accepting the value
But when i change the calcualtion like below :

Morethan1Lakh = IF(SUM(Orders[Sales])>=POWER(10,5),1,0)

Than use them in Values in Conditional Formatting
nabandla_2-1721802549721.png

working as expected why it was not working with Field Values what is the reason?



4 REPLIES 4
bhanu_gautam
Super User
Super User

@nabandla , In Power BI, conditional formatting based on field values requires the field to be a numeric value that can be evaluated directly. When you use a measure that returns a boolean value (TRUE/FALSE), it may not be directly usable in the conditional formatting settings because Power BI expects a numeric value for such operations.

 

For more details you can go through below article

 

Conditional Formatting in Power BI - Excelerator BI




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






@bhanu_gautam- if i change the calcualtion from Boolean to 1 and 0 --> Selecting the Field Value still i am unable to populate that

Do i have to change the calculation in a way to use it ??

Anonymous
Not applicable

Hi @nabandla ,

Regarding our discussion, I wonder if this issue has been resolved by now? It's been a long time since I've heard back from you and I'm not sure if all is well. Please feel free to let me know if there is anything else I can do to help.

 

Hope it helps!

 

Best regards,
Community Support Team_ Tom Shen

 

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

Anonymous
Not applicable

Hi @nabandla ,

Thank you @bhanu_gautam   very much for the solution, and on the basis of what you've done, I'll suggest a little something that will further help him out:

When I also set it to 1, 0 it is also not recognized here, because it is possible that 1, 0 is also treated as a boolean value for some specific values, so I tried to do a substitution for 1, 0.

vxingshenmsft_0-1721888971545.png

When we put double quotes around 1, 0, we can use field value, the

This specifies that 1 and 0 are used as integers.

vxingshenmsft_1-1721888991847.png

It works, but it's pointless. If you want the same effect as rules, you can try defining the arrows manually.

vxingshenmsft_2-1721889112469.png

If you have other needs for conditional formatting, this is the documentation I found for you, I hope it helps.

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

Hope it helps!

Best regards,
Community Support Team_ Tom Shen

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

Helpful resources

Announcements
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.