Forum Discussion
Compare measure between months
Hi!
I have a measure with some calculation on different departments and metrics , In addition Im using a slicer so the report users can filter the month they want to see.
The row data looks like this:
| VALUE | Period | Metric | Dep |
| 2 | Jan 2020 | x | a |
| 20 | Jul 2020 | y | b |
| z | c |
on the report there is a Matrix looks like this (and the slicer I mentioned) :
| c | b | a | |
| measure | measure | measure | x |
| measure | measure | measure | y |
| measure | measure | measure | z |
what Im trying to do is to create a new measure that does the same calc but on prev month. for example: if the slicer is April, this measure will show the calc for March. (the main purpose is to use conditional formatting to show if there is an increase/decrease in the measure compared to last month)
Thanks!
Hi, Anonymous
Please correct me if I wrongly understand your question.
If your slicer selection is April 2020, and you want to show the number of March 2020, right?
You have a custom date table?
please try to use DATEADD function in your measure.
something like,
previousmonth = calculate (currentmeasure, dateadd(dates[date], -1, month))
Or, if you can share your sample data file, I can try to have a look into it and come up with an accurate outcome.
thank you very much.
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos!!
2 Replies
- Jihwan_Kim
Super User
Hi, Anonymous
Please correct me if I wrongly understand your question.
If your slicer selection is April 2020, and you want to show the number of March 2020, right?
You have a custom date table?
please try to use DATEADD function in your measure.
something like,
previousmonth = calculate (currentmeasure, dateadd(dates[date], -1, month))
Or, if you can share your sample data file, I can try to have a look into it and come up with an accurate outcome.
thank you very much.
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos!!
- AnonymousNot applicable
Thanks a lot!