Forum Discussion

gdexter's avatar
gdexter
Frequent Visitor
8 years ago
Solved

Comparing selected month automatically with previous month

Hi Power BI community,   I need your help!   Would like to select a date range using slicer and then have a two tables below. One which shows data for the selected month, and one which dynamicall...
  • v-piga-msft's avatar
    8 years ago

    Hi gdexter,

     

    Based on my understand for your requirement, I made a test.

     

    You could create two measures like below.

     

    current date = CALCULATE(SUM('table'[Sales]))

    last month = CALCULATE(SUM('table'[Sales]),DATEADD('table'[Date],-1,MONTH))

    So that you could get the output below.

     

    For more details, you could have a reference of this attachment.

     

    If you still need help, please share some data sample witch could reproduce your scenario, so that we can help further investigate on it?

     

    Best  Regards,

    Cherry