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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
tloup
Frequent Visitor

Conditional formatting with Calculation items

Hello 

 

Does anyone know how to perform conditional formatting with calculation items? I have seen there have been some previous posts about this but for some reason the solutions don't for me, perhaps this is because of updates? 

 

Any help would be v gratefully received!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @tloup ,

Based on my testing, please try the following methods:

1.Create the sample table.

vjiewumsft_0-1712195336494.png

2.Create the measure to calculate the sum.

 

Measure = CALCULATE(SUM('Table'[Total Sold]), ALLEXCEPT('Table','Table'[day]))

 

3.Create the measure for conditional formatting.

 

conditional format = 
var _sel = SELECTEDVALUE('Table'[day])
return
IF(_sel = DATE(2024,3,23),"Yellow")

 

4.Drag the date into table visual. Right click on the measure and select conditional formatting.

vjiewumsft_1-1712195401374.png

5.Select Field value and select the conditional format measure.

vjiewumsft_2-1712195417111.png

6.The result is shown below.

vjiewumsft_3-1712195425233.png

You can also view the following documents to learn about conditional formatting.

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

Solved: Use Font colour formatting on Calculation item wit... - Microsoft Fabric Community

 

Best Regards,

Wisdom Wu

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

1 REPLY 1
Anonymous
Not applicable

Hi @tloup ,

Based on my testing, please try the following methods:

1.Create the sample table.

vjiewumsft_0-1712195336494.png

2.Create the measure to calculate the sum.

 

Measure = CALCULATE(SUM('Table'[Total Sold]), ALLEXCEPT('Table','Table'[day]))

 

3.Create the measure for conditional formatting.

 

conditional format = 
var _sel = SELECTEDVALUE('Table'[day])
return
IF(_sel = DATE(2024,3,23),"Yellow")

 

4.Drag the date into table visual. Right click on the measure and select conditional formatting.

vjiewumsft_1-1712195401374.png

5.Select Field value and select the conditional format measure.

vjiewumsft_2-1712195417111.png

6.The result is shown below.

vjiewumsft_3-1712195425233.png

You can also view the following documents to learn about conditional formatting.

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

Solved: Use Font colour formatting on Calculation item wit... - Microsoft Fabric Community

 

Best Regards,

Wisdom Wu

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.