Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Phil_Seamark
Employee
Employee

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
Employee
Employee

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors