Forum Discussion

sentsara's avatar
sentsara
Helper II
8 years ago
Solved

Filtering last 3 months data in PowerBI

Hi,

Right now,I manually filter the last 3 months from the visual filter "DayNumberOfMonth" =April,May and June..

I need dyanamically the last 3 months should be filtered every month.how this can be done?

VisualLevel Filter

 

 

 

  • Hi sentsara

     

    If you add a DateTime field to the filter you can use the Relative date filtering option and set your criteria as preferred.

     

  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi sentsara, that was my issue until i've found out about relative filtering in slicers.

     

    For the last three months or any other time period, instead of using filters, add a date slicer into your report, select carat in upper right of the slicer and select relative from dropdwon. The rest steps are pretty evident, choose last three months and that's done!

     

    You can find the whole text and guideline here:

     

    https://docs.microsoft.com/en-us/power-bi/desktop-slicer-filter-date-range

     

    Hope this helps.

     

    Ehsan

7 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    Hi sentsara

     

    If you add a DateTime field to the filter you can use the Relative date filtering option and set your criteria as preferred.

     

    • Malkeet83's avatar
      Malkeet83
      Frequent Visitor

      But this will be filter all data of report

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Phil!
      I have a line graph with this filter, but I also need that if the user wants to look for other date, could do it. For example look for the same month but on 2022.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi sentsara, that was my issue until i've found out about relative filtering in slicers.

     

    For the last three months or any other time period, instead of using filters, add a date slicer into your report, select carat in upper right of the slicer and select relative from dropdwon. The rest steps are pretty evident, choose last three months and that's done!

     

    You can find the whole text and guideline here:

     

    https://docs.microsoft.com/en-us/power-bi/desktop-slicer-filter-date-range

     

    Hope this helps.

     

    Ehsan