Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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:  

VALUEPeriodMetricDep
2Jan 2020xa
20Jul 2020yb
  zc

 

on the report there is a Matrix looks like this  (and the slicer I mentioned) : 

cba 
measuremeasuremeasurex
measuremeasuremeasurey
measuremeasuremeasurez

 

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

  • 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!!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks a lot!