Forum Discussion

GarryPope's avatar
GarryPope
Advocate I
4 years ago
Solved

Compare increase/decrease of previous two months using Date/Time column

Hello all, I'm pretty new to Power BI, so please forgive me. I hope you can help please. I have a table in Dataverse called App. It has two columns: appid appcreatedon Note: the appcreatedo...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi GarryPope ,

     

    Check the measure.

    measure = 
    var last_month = CALCULATE(COUNT('Table'[appid]),FILTER(ALL('Table'),'Table'[appcreatedon].[MonthNo]=SELECTEDVALUE('Table'[appcreatedon].[MonthNo])-1))
    var last_2month = CALCULATE(COUNT('Table'[appid]),FILTER(ALL('Table'),'Table'[appcreatedon].[MonthNo]=SELECTEDVALUE('Table'[appcreatedon].[MonthNo])-2))
    return
    (last_month-last_2month)/last_2month

     

    Best Regards,

    Jay