Forum Discussion

Glaeran's avatar
Glaeran
Frequent Visitor
9 years ago

Filter data by latest available date

Hello Everyone,

 

I would like to filter out data on some visuals inside my report based on the latest available date. (preferably by selecting latest available date on slicer)

 

I have found this solution:

https://community.powerbi.com/t5/Desktop/Setting-the-Default-Value-of-a-Slicer/td-p/16442

 

However, we don't want to show the latest available week as "Latest week", but as normal date.. Is it possible to do?

3 Replies

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Icon for Community Support rankCommunity Support

    Hi Glaeran,

     

    In your scenario, you can create a calculated column to return True or False to indicate the each date whether it's in the last week.

     

    IsLastWeek = IF(WEEKNUM('Table1'[Date ],1)=WEEKNUM(NOW(),1)-1,TRUE(),FALSE())

     

    Then use HierarchySlicer visual to display both IsLastWeek column and Date column. For more information, please see attached .pbix file.

     

     

    Best Regards,
    Qiuyun Yu

    • Glaeran's avatar
      Glaeran
      Frequent Visitor

      v-qiuyu-msftthat's not exactly what I'm looking for..

       

      I have following slicer:

       

       

      What I would love to achieve is PowerBI to automatically select latest available date (so in that case 17.03.2019, but once new data appears that would be 24.03.2019 etc..).

       

      The less loved way would be to pass maximum date value into some parameter and filter out report by default by it assuming no selections on slicer are made.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Glaeran,

         

        I was facing the same issue and was wondering if you found a way to circumvent that problem. Kindly let me know if you found a solution to this problem!

        Thanks