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.

Generated Month-over-month is incorrect/unexpected behaviour

This is the generated code

 

GP MoM% = 
VAR __PREV_MONTH = CALCULATE([GP], DATEADD('Calendar'[Date], -1, MONTH))
RETURN
	DIVIDE([GP] - __PREV_MONTH, __PREV_MONTH)

However if I look at the end of a month at a daily granularity, say for ex 30 & 31st May its calculating a percentage for both using the Value of April 30th as there is no April 31st. Should it not be blank instead?

Status: Needs Info
Comments
v-qiuyu-msft
Community Support

Hi @eugeneniemand,

 

Please share pbix file with us. Do remove sensitive data before sharing. 

 

Best Regards,
Qiuyun Yu

Vicky_Song
Impactful Individual
Status changed to: Needs Info
 
eugeneniemand
Frequent Visitor

Please see PBIX here : https://www.dropbox.com/s/ic3ke130z98c12c/MoM-Issue.pbix?dl=0

 

You will notice that the two Expected columns are blank for 31st May

The values for each day is a follow:

  • April = Day of the Month
  • May = Day of Month + 10

You will also notice using the Date Add function I get the value 30 i.e. 30th April's value is repeated for May 31st. Also Previous Month is showing the Total For april at every day. 

 

My question is can I get the expected behaviour without the complicated logic in my measures using just time intelligence funtions