Forum Discussion

Tani4ka's avatar
Tani4ka
Helper II
1 year ago
Solved

Previous Period measure

hello, I need to create a measure that will show comparison for a previous period when the data is monthly/quarterly of Yearly.   So far i created one that gives correct compariosn MoM but when 2 ...
  • amitchandak's avatar
    1 year ago

    Tani4ka , Previous month take first avaiable month. So your Qtr and yeat comparison will not work. 
    Do Switch the measure using isinscope 

    How to Switch Subtotal and Grand Total in Power BI | Power BI Tutorials| isinscope: https://youtu.be/smhIPw3OkKA

    Switch(true(),
    isinscope(Date[Month]) , [MoM%],
    isinscope(Date[Qrt]) , [QOQ%],
    isinscope(Date[Year]) , [YoY%])


    You can have full formula, if you do have all measures