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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
brockry1
Helper II
Helper II

Conditional Formatting

I ceated a formula to create a new column and bring back a 1 if the criteria is true and 2 if it is false.  I added it to my visual and it worked however when I try to format it using Icons it is not flagging the rule I expected.  As you can see it is bringing a 1 if true and 2 if false.  

 

 

brockry1_0-1734119854930.png

 

I then went into the visual to create a conditional format to flag the "2"s to show a red flag.

 

brockry1_2-1734120016675.png

 

brockry1_3-1734120059495.png

 

It did not flag my 2's but is flagging random rows.

 

brockry1_4-1734120120596.png

 

Am I doing something wrong. 

 

 

1 ACCEPTED SOLUTION

I figured it out.  In the rules of the conditional formatting instead of calcuating on sum I changed it to maxium and it is now bringing back what I need. 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @brockry1 

 

I would like to ask what is the DAX formula for creating a new column?
Could you please provide sample data that would completely cover your problem? A pbix file would be great.(Remove privacy information)

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

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

Flag = SWITCH(TRUE(),

'Account Data'[Combined Sell-To Number]='Account Data'[Sell_To_Number],1,

2)
 
The formula is working as far as bring back the true, false statements.  It's when I implement the conditional formatting on the icon when it is not bringing back the flag to the appropriate numbers. 
lbendlin
Super User
Super User

looks like your flag is a calculated column.  Most likely you wanted it to be a measure.

The column is bringing back the correct true, false conditions.  Where I ran into an issue was with the conditional formatting using hte icon and it is not showing a flag on the 2's like it should.  

 

I figured it out.  In the rules of the conditional formatting instead of calcuating on sum I changed it to maxium and it is now bringing back what I need. 

Anonymous
Not applicable

Hi @brockry1 

 

I am happy to learn that you found the cause of the problem and fixed it.

Please accept your own reply as a solution, it will make it easier for other users who may be experiencing the same problem to find a solution.

 

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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