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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Mahadevaraobc
Helper II
Helper II

Highlight increase

Hi all,
Not sure if this is possible, i would like to highlight percentage increase by month.
Eg.
I have a table where column has month and products are in row
I would like highlight in red the value if value is greater than 10% when compared to this month vs last month.
1 ACCEPTED SOLUTION

Well, that depends on your data. 

 

You need a calendar table https://exceleratorbi.com.au/power-pivot-calendar-tables/

and time intelligence calcs. https://exceleratorbi.com.au/dax-time-intelligence-beginners/

 

Typically

total = sum(table[column])

total last month = calculate([total],dateadd(calendar[date],-1,year)

chg = [total] - [total last month]

% chg = divide([chg],[total last month])




* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

6 REPLIES 6

Yes it is possible, but you haven’t provided any detail. So, you need to 

1. Write a measure for this month

2. Write a measure for last month

3. Write measures for chg and %chg vs last month

4. Apply conditional formatting on your result based on the % chg measure. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Thanks for replying Matt, so what measure do I need to write for this month n last month?

Well, that depends on your data. 

 

You need a calendar table https://exceleratorbi.com.au/power-pivot-calendar-tables/

and time intelligence calcs. https://exceleratorbi.com.au/dax-time-intelligence-beginners/

 

Typically

total = sum(table[column])

total last month = calculate([total],dateadd(calendar[date],-1,year)

chg = [total] - [total last month]

% chg = divide([chg],[total last month])




* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Can I use the above formula for multiple months

Yes, it is a generic formula that works for any month.  If you post a sample workbook with some loaded realistic data including a calendar table, I will show you.



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

This doesnt work. The whole table colors will be changed based on last month data

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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