Forum Discussion
Anonymous
6 years agoNot applicable
Previous Month calculation (only include months from current year where we have data)
Hi all, I'm having a bit of a trouble with creating some measures correctly. I want to have a bar-chart visualization of change in percentage for current month vs. previous month. In the ...
- 6 years ago
Hi Anonymous
I edited your measures with adding IF function, please kindly check whether it works for you:
Previous Month = IF(ISBLANK([Total MonthlyMockUp]),BLANK(),CALCULATE( [Total MonthlyMockUp] , PREVIOUSMONTH( 'Date'[Date] )))% change = IF(ISBLANK([Previous Month]),BLANK(),DIVIDE( [Total MonthlyMockUp] , [Previous Month] , BLANK() ) - 1)Pbix attached,
v-diye-msft
6 years agoCommunity Support
Hi Anonymous
You might consider creating pbix file that will contain some sample data, upload the pbix to onedrive or dropbox and share the link to the file. Please do not forget to describe the expected results based on this sample data.
I'd like to draw it up for you.
Anonymous
6 years agoNot applicable
Hi v-diye-msft,
Thanks for your reply.
Here is the link for the .pbix:
https://1drv.ms/u/s!AnO2QNNGszZMjWorRLvE2Zqriy4y?e=oA6AFb
- v-diye-msft6 years agoCommunity Support
Hi Anonymous
I edited your measures with adding IF function, please kindly check whether it works for you:
Previous Month = IF(ISBLANK([Total MonthlyMockUp]),BLANK(),CALCULATE( [Total MonthlyMockUp] , PREVIOUSMONTH( 'Date'[Date] )))% change = IF(ISBLANK([Previous Month]),BLANK(),DIVIDE( [Total MonthlyMockUp] , [Previous Month] , BLANK() ) - 1)Pbix attached,
- Anonymous6 years agoNot applicable