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
Paulyeo11
Impactful Individual
Impactful Individual

Monthly Bar chart how to set X axis bar color before COVID yellow color ?

Hi All

Paulyeo11_0-1602924138717.png

 

1 ACCEPTED SOLUTION

@Paulyeo11 

 

You can use the Same DAX and in data colors use the field value to change the color. 

manikumar34_0-1603120563515.png

 

https://www.dropbox.com/s/3paix06o82v3fob/preWebinarPostCal_PY_DATA%20V008%20Working.pbix?dl=0

 

Uploaded here.

 

Regards, 

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




View solution in original post

5 REPLIES 5
mahoneypat
Employee
Employee

To do this, make a measure like this

 

Bar Color = IF(MAX('Date'[Date])>=DATE(2019,1,1), "Green", "Yellow")
 
Then on the format options for your chart on Data Colors, hit the "fx" button, pick Field Value and the above measure (modified with your threshold date and colors).  This is what the above looks like in a chart.
 
 
 
 
 
Regards,
Pat
 




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

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hi Sir

 

Thank you very much for sharing , kindly help me set up by make those 4 bar which only after Feb 2020 is blue color the rest yellow color. ( i have try to so it myself , i cannot figure out where to paste your expression )

 

https://www.dropbox.com/s/8sdwhpjxced7wqn/preWebinarPostCal_PY_DATA%20V008%20Working.pbix?dl=0

@Paulyeo11 

 

You can use the Same DAX and in data colors use the field value to change the color. 

manikumar34_0-1603120563515.png

 

https://www.dropbox.com/s/3paix06o82v3fob/preWebinarPostCal_PY_DATA%20V008%20Working.pbix?dl=0

 

Uploaded here.

 

Regards, 

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




Hi Mani

Thank you vry much , finally i know where to link the Bar color field. now it work fine.

Paulyeo11_0-1603189644907.png

 

@Paulyeo11 ,

 

Awesoem, I am happy for you. You got the answer. Keep in touch.

 

Follow me on LinkedIn

 

Regards, 
Manikumar

 





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




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.