cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Phil_Seamark
Microsoft
Microsoft

Advanced date filter for terms like "Today" and "Yesterday"

When I use the Q&A feature, I can use terms like Today, Yesterday, Last week etc.  This is really cool.  I also note that the Q&A adds these terms to the filter box.

 

What I'd like to be able to do is to create those terms when doing normal report page editing.  Any thoughts on when this might be available?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

2 REPLIES 2
v-caliao-msft
Microsoft
Microsoft

@Phil_Seamark

 

Based on your description, you need a filter like Today and Yesterday in your report, right?

 

If that is the case, please refer to the steps below to achieve it.

 

  1. Create a new table by using Enter Data.
    Capture.PNG
  2. Create a calculated column in original table
    Difference = 1*(QA[Date]-today())
    Capture1.PNG
  3. Create a realationship by using Difference column in two tables.
    Capture2.PNG
  4. Then you can use the Item column into your slicer.
    Capture4.PNG


Reference
http://www.powerpivotpro.com/2013/03/guest-post-always-show-yesterday-today-or-tomorrows-data/

 

Regards,

Charlie Liao

Hi @v-caliao-msft,

 

Thanks for taking the time to respond and I do that now for models I build in Power BI Desktop and upload to the Service.

 

However the model I am interested in using this for is a dataset created using the API.  You can't create relationships or calculated measures yet (I understand this is in Preview) via the API.  


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors