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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Faye1901
Helper I
Helper I

difference between counts of previous month data

Hi Everyone,

I can't quite make an existing post work on this one, can anyone shed some light?
I've got a table [ProjectSnapshots] that reports an overall status (red, amber, green) that run for each project within our portfolio, in every month. I've plotted a graph with measures I created to show the count of each status across our portfolio in each month, and I want to compare these counts between the current and previous months (and display this as a trend with an up or down arrow icon next to the graph).


I've been around in circles with my DAX but this is how I want it to look:  

Up or down in RED =
Var DifferenceRed = calculate([countRED], month(today()) - [countRED], month(-1))
Return
if(DifferenceRed>=1, PWAURL & "/_layouts/15/inc/PWA/images/ArrowUp.png", PWAURL & "/_layouts/15/inc/PWA/images/ArrowDown.png")

graph.PNG 

thanks in advance
Faye

2 REPLIES 2
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Faye1901,

Could you please share a sample data to have a test and post your desired result if possible?

 

Regards,

Daniel He 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hmmm not easily for IP reasons. I'm trying to make a (working) IF statement evaluate for a second condition.

1. Graph showing count of Projects with a given status (red, amber, green) per month.
2. My desired result - this icon should be showing a cf_50p (blank circle) icon referenced in my IF statement, because as you can see from the summary table, the result for this month = 0. I'd like to know how to make my IF statement consider the context of the current month. At the moment I think the IF statement is summing all the values across all months, hence it's reporting an increase.
3. My summary table - I inserted to check that my maths was right for the measures calculating count of each for previous and current months (you can see they're right from the graph).

 

BI icon measure.PNG

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors