Forum Discussion
Comparison- current month vs previous month
- Anonymous9 years ago
Sure there is a way! :-)
You can use DAX to creat the appropriate measures to show in your matrix. See some example here: https://powerbi.tips/2016/07/measures-month-to-month-percent-change/.
But first you need to make sure the Date column is of Date data type - you need this in order to use Time Intelligence functions in DAX and to allow Power BI to deal with time hierarchy.
Hope that helps.
Cheers,
Pawel
- Anonymous9 years ago
OK, try out this .pbix file and see if the approach used inside fits your need: http://blog.sqlgeek.pl/Download/DAX - Month over Month.pbix.
I used the same DAX function mentioned in the article (PREVIOUSMONTH). And presence of the regions in your data doesn't change much.
Cheers,
Pawel
- Anonymous9 years agoInstead of PREVIOUSYEAR use SAMEPERIODLASTYEAR function.
Sure there is a way! :-)
You can use DAX to creat the appropriate measures to show in your matrix. See some example here: https://powerbi.tips/2016/07/measures-month-to-month-percent-change/.
But first you need to make sure the Date column is of Date data type - you need this in order to use Time Intelligence functions in DAX and to allow Power BI to deal with time hierarchy.
Hope that helps.
Cheers,
Pawel
thx for the suggestion...but it doesn't work on my data...as u can see i have repeated region in every month...it is the difference between my data n your data
- Anonymous9 years agoNot applicable
OK, try out this .pbix file and see if the approach used inside fits your need: http://blog.sqlgeek.pl/Download/DAX - Month over Month.pbix.
I used the same DAX function mentioned in the article (PREVIOUSMONTH). And presence of the regions in your data doesn't change much.
Cheers,
Pawel
- CTan429 years agoHelper II
Anonymous
Thanks....It works...I have another question as well...how about if i wanna compare current month with last year month. Is there anyway to do that. I had tried the similar step.
Belows are the measurea:
Revenue LYM = CALCULATE([Revenue CM],PREVIOUSYEAR(Data[Date]))
Revenue CMvLLYM = [Revenue CM]-[Revenue LYM]
However it doesn't work. Can you see the problem?
- Anonymous9 years agoNot applicableInstead of PREVIOUSYEAR use SAMEPERIODLASTYEAR function.