Showing results for 
Search instead for 
Did you mean: 
Faye1901 Frequent Visitor
Frequent Visitor

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))
if(DifferenceRed>=1, PWAURL & "/_layouts/15/inc/PWA/images/ArrowUp.png", PWAURL & "/_layouts/15/inc/PWA/images/ArrowDown.png")


thanks in advance

Microsoft v-danhe-msft

Re: difference between counts of previous month data

Hi @Faye1901,

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



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.
Faye1901 Frequent Visitor
Frequent Visitor

Re: difference between counts of previous month data


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

New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)