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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Conditional Formating | Each Column - Separatly

Hello,

I guess this should be a standard requirement but I cant find any solutions to this.

 

The case is pretty simple. I have dates (column), hours (Row) and lets say conversion as a value. I want a conditional Formating for each day separatly.

 

When I am actually using the conditional formating it ditribute the colors basically on all the data. I want to know what is the best hours for every day (row) separatly and make it visible with colors.

 

I hope I was clear enough. Again I cant imagine there is no accessible workflow for this requierement (?).

 

Thank you for your time.

5 REPLIES 5
Anonymous
Not applicable

Here are some screenshot who should clear up what what I am looking for. I manipulated one value (the 27 at 16:00) to make my issue more clear.

 

The left Screenshot is the conditional formating I am looking for.

 

laurent001_0-1598263665049.png

 

The left conditional formating is the result I am looking for but I have to define the values (max. and min.) in upfront.

laurent001_1-1598263831921.png

The screenshot on the right is the conditional formating with the dynamic parameter I am lookig for but the result is not the right one.

laurent001_2-1598264247168.png

 

Hi @Anonymous ,

 

Could you share the sample data?

In my tests, I don't need to set the maximum and minimum values to get the expected result.

V-lianl-msft_0-1598420980379.png

 

 

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

Anonymous
Not applicable

First, thank you for the answer. It is not working in your example neather. Look at the first row, there is no max or min in this row, its just over all values.

 

As far as I see in your case PowerBI ist looking on all the data and distribute the color based on the highest and lowest color on all values. I want a color distibution based on each Colomun. This means a highest and lowest value on each column.

 

In my example sample I put an atificial very high value in the first day to show that PowerBI is calculating every value together. If Power BI had calculated each column separatly we had dark and light colors on every column.

 

And dont have the sample of data anymore but this is a problem I am often confronted with. Just put a very high value in one column and you should see the problem in your data.

amitchandak
Super User
Super User

@Anonymous , You need to create a measure like this and use that in conditional formatting "Field" option

 

Colour = 
SWITCH(TRUE(),
Table[Date] < TODAY(), "red",
Table[Date] = TODAY(), "orange",
"green")

Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK(Table[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))

Color  = if(FIRSTNONBLANK(Table[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170 
,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")

color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
/// Add more conditions
"red"
)

 

refer

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Pragati11
Super User
Super User

Hi @Anonymous ,

 

In order to answer your query, please add details like screesnhot on what you are trying to achieve.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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 Solution Authors
Top Kudoed Authors