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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Dax formula to calculate % Change, and then Conditional Formatting of that result

This is sort of a compound problem:

 

I have a data table that contains the vacancy by geography and time period.

 

I have a matrix visualization that shows that vacancy in two time periods.

 

I would like to calculate the % change between only those two time periods, and then apply background conditional formatting to only the 2020.06 column of a color range of highest to lowest, and sort the table by the % change of highest to lowest.

 

The two time periods: 2019.06 and 2020.06

% Change = (The vacancy of 2020.06 - the vacancy of 2019.06) / (the vacancy of 2020.06)

 

This is the matrix table. 

Image 7.png

 

 

3 REPLIES 3
harshnathani
Community Champion
Community Champion

HI @Anonymous ,

 

 

Assuming 2019.06 and 2020.06 are measures

 

Create a new measure

 

PercentChange = DIVIDE([2020.06] - [2019.06] , [2020.06])

 

 

Incase 2019.06 and 2020.06 are columns

 

Create a new measure

PercentChange = DIVIDE(MAX('Table'[2020.06]) - 'Table'(MAX( [2019.06])  , MAX('Table'[2020.06]))

 

 

Then Select the 2020.06 Column and Right Click, Select Background Formatting.

 

1.jpg

 

 

 

From the dropdown Select the measure PercentChange

 

 

2.JPG

 

 

Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

 

Anonymous
Not applicable

2019.06 and 2020.06 are values within a column titled 'Year Mo'

HI @Anonymous ,

 

Share sample Data Please in text form

 

Regards,

Harsh Nathani

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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