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
Anonymous
Not applicable

Measure to calculate previous month and previous second reporting month

Hi! I'm fairly new to PowerBI, but am reading a lot of articles and learning a lot. I did come across an issue I can't seem to figure out though (well, it worked, until we entered Jan.). I am trying to get a measure for the MOM% from the previous month and the previous second month ( because I create the report at be beginning of the month to display the previous month's reporting data). I was using this measure to get the previous month (which worked until entering the new year): Month Issues = CALCULATE( DISTINCTCOUNT('Issues'[Issue key]), FILTER(Issues, MONTH(Issues[Date Created])=MONTH(TODAY()) -1) ) Then this measure to get the previous second month: Prior Month Issues = CALCULATE( DISTINCTCOUNT('Issues'[Issue key]), FILTER(Issues, MONTH(Issues[Date Created])=MONTH(TODAY()) -2) ) Then this measure to get the MOM%: Increase in Issues Created = IF(ISBLANK(Issues[Prior Month Issues]),0,(Issues[Month Issues]-Issues[Prior Month Issues])/Issues[Prior Month Issues]) Date created format is MM/DD/YYYY (there could be any number of issues created within each day of the month) I do have a date table with a relationship to my issues table however, the relationship is based upon a different date column. I've tried modifying a lot of the examples that I've seen from others post, but can't seem to get it to work. Any help would be greatly appreciated. TIA
1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may use DATEDIFF.

 

DATEDIFF ( Issues[Date], TODAY (), MONTH ) = 1

 

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

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may use DATEDIFF.

 

DATEDIFF ( Issues[Date], TODAY (), MONTH ) = 1

 

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

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.