Forum Discussion

vaidehi31's avatar
vaidehi31
Frequent Visitor
5 years ago
Solved

Last N Fiscal Quarters Slicer/Filter

Hello,   I need to create a slicer where I need Last 4 quarters, Last 8 quarters and Last 12 quarters as the items. I have a calendar table and also have the fiscal quarters. The problem I'm facing...
  • v-xulin-mstf's avatar
    5 years ago

    Hi vaidehi31

     

    You can create a new table as:

    And then use switch to filter different time periods.

    Create a measure like:

    = SWITCH([slicer table], Last 4 quarter, DATESBETWEEN(Last 4 quarter), 
                             Last 8 quarter, DATESBETWEEN(Last 8 quarter),
                             Last 12 quarter, DATESBETWEEN(Last 12 quarter),
            )  

     

    You can refer: https://docs.microsoft.com/en-us/dax/switch-function-dax

     

    Best Regards,

    Link