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
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
Employee
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
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.