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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Color formatting of every bar

Hi guy's

I have a Bar chart Visualization like this,

Capture.JPG

I have a requirement like every bar till 13 values it'll showing yellow after 13 white, Is it possible for writing Dax of this issue.  

I want to like this.

 Capture1.JPG

regards,
Naveen

1 ACCEPTED SOLUTION
VasTg
Memorable Member
Memorable Member

@Anonymous 

 

I would split the measure into two and use them stacked bar chart. This way you could change the color for individual measure.

 

Measure 1 = IF(SUM(Sales[Revenue])>13,SUM(Sales[Revenue])-13,0)
Measure 2 = IF(SUM(Sales[Revenue])>13,13,SUM(Sales[Revenue]))
 
Note that the sorting order might differ but I guess you could use Sort By column option to sort it based on your need.
Capture3.PNG
If it helps, Please mark this answer as a solutions.
Kudos are good too.
Connect on LinkedIn

View solution in original post

1 REPLY 1
VasTg
Memorable Member
Memorable Member

@Anonymous 

 

I would split the measure into two and use them stacked bar chart. This way you could change the color for individual measure.

 

Measure 1 = IF(SUM(Sales[Revenue])>13,SUM(Sales[Revenue])-13,0)
Measure 2 = IF(SUM(Sales[Revenue])>13,13,SUM(Sales[Revenue]))
 
Note that the sorting order might differ but I guess you could use Sort By column option to sort it based on your need.
Capture3.PNG
If it helps, Please mark this answer as a solutions.
Kudos are good too.
Connect on LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.