Forum Discussion
Count for Previous Month, Data for multiple Years
Hi,
I am trying to calculate a count for previous month taking into account data that spans across multple years.
I have a calendar table connected to my fact table, here are my two measures:
So I need to account for the year as well, it has to be previous calendar month for 2023.
Here is a small sample of my data:
Sample Data.pbix
4 Replies
- ryan_mayuSuper User
what's the expected output for the sample data you provided?
- UnknowncharacteHelper III
In the sample PowerBI dataset, I have a card showing the # I need.
I just want the # of Closed HR compaints for previous month - Septermber 2023
The complication is comes in with multiple years in the dataset, also, when it's January 2024, the calculation has to account for previous month and year = December 2023
- ryan_mayuSuper User
have you tried to use USERELATIONSHIP to activate the inactive relationship?
USERELATIONSHIP function (DAX) - DAX | Microsoft Learn