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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.