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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JUANROVALETTI
Frequent Visitor

conditional formatting in a column chart

HI in my monthly report where the user must select a month i have all my visual affected by that month slicer.

JUANROVALETTI_0-1692565876501.png

 

But i add one visual where i want to show :
the total spend from the begining of the year ( i have a measure for total spend) 

so i solved it using a column chart  whit de x-axis the dates from my calendar dates and in the y-axis the total spend measure and from (edit interactions) decides to not apply the selected month in that visual.

In the image there is the column chart and over a card that is in intereaction with the month slicer so it is showing the spend from JUNE .

the thing is that i want to apply a conditional formatting to show in the column chart the selected month. its posible??

 

JUANROVALETTI_1-1692566094934.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JUANROVALETTI ,

 

I suggest you to create an unrelated calendar table to help your calculation.

Unrelated DimMonth = CALCULATETABLE('Calendar')

Measure:

Month Spend = 
VAR _SELECTYEARMONTH = SELECTEDVALUE('Unrelated DimMonth'[YearMonth])
RETURN
CALCULATE(SUM('Table'[Sales]),'Calendar'[YearMonth] = _SELECTYEARMONTH)
Color = 
VAR _SELECTMONTH = SELECTEDVALUE('Unrelated DimMonth'[MonthName])
RETURN
IF(MAX('Calendar'[MonthName]) = _SELECTMONTH,"Yellow")

Configure the column color as below.

vrzhoumsft_0-1692682882990.png

Result is as below.

vrzhoumsft_1-1692682917526.png

Best Regards,
Rico Zhou

 

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

View solution in original post

7 REPLIES 7
parry2k
Super User
Super User

@Anonymous Thanks for the answer but not sure why would you reply until there is a reply to my last message. What's the point? There was no feedback if my posted solution didn't work and required further solutions.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@JUANROVALETTI you have to follow the technique used in this video, basically you need another table for the date slicer and then compare it with the main date table you are using on the x-axis and where it matches, highlight that bar using conditional formatting: Learn DAX techniques to highlight or shade data points in the visuals - Time Intelligence Power BI -...



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@JUANROVALETTI I see, in the column chart you want to change the color of the bar for the selected month, correct?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

yes.

 

Anonymous
Not applicable

Hi @JUANROVALETTI ,

 

I suggest you to create an unrelated calendar table to help your calculation.

Unrelated DimMonth = CALCULATETABLE('Calendar')

Measure:

Month Spend = 
VAR _SELECTYEARMONTH = SELECTEDVALUE('Unrelated DimMonth'[YearMonth])
RETURN
CALCULATE(SUM('Table'[Sales]),'Calendar'[YearMonth] = _SELECTYEARMONTH)
Color = 
VAR _SELECTMONTH = SELECTEDVALUE('Unrelated DimMonth'[MonthName])
RETURN
IF(MAX('Calendar'[MonthName]) = _SELECTMONTH,"Yellow")

Configure the column color as below.

vrzhoumsft_0-1692682882990.png

Result is as below.

vrzhoumsft_1-1692682917526.png

Best Regards,
Rico Zhou

 

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

parry2k
Super User
Super User

@JUANROVALETTI you can add a measure for the selected month and then use this measure as a title of the column chart:

 

 

Selected Month = SELECTEDVALUE ( DateTable[Month Column from Slicer] )

parry2k_0-1692569094649.png

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

okey thanks. but that's not my issue, i want the columns chart have a conditional formatting that change the color only for the selected month. but remember that i disabeled the interaction between the month slicer for the visual. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors