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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
JackieC
New Member

Conditional formatting Min and Max value within each month in a Clustered Column Chart

Hi guys,

 

So I have this chart that I want the value of min and max to show for each month. How can I achieve this using conditional formatting without using DAX etc? I am on a beginner level and I can't absorb the context of DAX or anything that requires coding.

Can it be done?

Or perhaps just use conditional formatting on the table below to show the min and max in bold font? How to do this?

 

JackieC_0-1720686905774.png

 

 

3 REPLIES 3
AllisonKennedy
Super User
Super User

@JackieC  even with DAX, the conditional formatting for your bar chart isn't possible with something in the 'legend' field, so you'd have to create a separate measure for each M1, M4, etc and then it would be rather complex DAX.

 

Can you send screenshots of what your 'build a visual' pane looks like for the table and column chart? We may be able to provide some tips for you, but I'm not quite sure how you've set up your data model and think it may be a bit tricky. I'm sensing there may be an unpivot requirement as part of this.... 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

@AllisonKennedyThanks, pls see screenshots below on what I have

Table view

JackieC_0-1720768517200.png


Build visual for the colorful chart

JackieC_1-1720768549235.png

Build visual for the simple table below

JackieC_2-1720768656443.png

 

@JackieC  It may just be because I love DAX so much, but I can't think of a solution without DAX for this one;

 

I would recommend unpivoting all the columns you're currently using in the 'y-axis' (both the column and line) - you can do this in Transform Data (Power Query).

 

Then create a measure for [Forecast] and put it in the column y-axis and a measure for [Actual Usage] and put it in the line y-axis

 

Then you can put the newly created 'Attribute' column (it will be created when you do the unpivot) in the x-axis and apply conditional formatting on the y-axis column colour.

 

DAX for measures:

 

Forecast = 
SUMX(
FILTER( tablename, CONTAINSSTRING( tablename[Attribute], "forecast") ),
tablename[value]

)

 

Actual Usage = 
SUMX(
FILTER( tablename, CONTAINSSTRING( tablename[Attribute], "actual") ),
tablename[value]

)


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.