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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Evogelpohl
Helper V
Helper V

Q&A Filter for Today or Yesterday

In the Q&A UX, it's possible to 'ask':  "Your_Value by DateTime for Today (or Yesterday)" and the Filter UX will note "DateTime is today (or yesterday)".  But, you can't select this type of filter from the filter drop down.  Will dynamic filters like 'latest value', 'today' or 'yesterday' be added to the pick list?

 

Also, after you pin that visual to the dashboard, and then click it to go back to the QA editor, the "DateTime is today" filter disappears.  It's as if it doesn't know how to reproduce it.  

 

Some bugs here.

9 REPLIES 9
PowerBiLearner1
New Member


@Evogelpohl wrote:

In the Q&A UX, it's possible to 'ask':  "Your_Value by DateTime for Today (or Yesterday)" and the Filter UX will note "DateTime is today (or yesterday)".  But, you can't select this type of filter from the filter drop down.  Will dynamic filters like 'latest value', 'today' or 'yesterday' be added to the pick list?

 

Also, after you pin that visual to the dashboard, and then click it to go back to the QA editor, the "DateTime is today" filter disappears.  It's as if it doesn't know how to reproduce it.  

 

Some bugs here.


I would like to add a filter to remove items AFTER let's say Jan.1/2000 How woild I do that?

 

With the any date included as a filter you can use the advanced filter dialog to specify Before <date>.

 

As for the concept of "Today" filters, right now the best workaround is to create helper flag fields in your date dimension which are true or false based on the criteria you'd like, and refreshed as part of your model nightly. So TodayFlag's filter could be set to True. Then every day, since the date dimension has been refreshed, TodayFlag would be true on ... today.

 

 

Still no solution to this. It feels like a fundemental flaw.

 

I've got a Direct Query connection to avoid pulling down Gigabytes of useless data when want to see Today and Yesterday. The problem I have is there is no way todo this without going in every day and editting this for my users. 

 

If I derive a col that uses data diff and then filter to = 0. It still has to pull everything todo this. I can define a month or year and make my life a little less repetative. But come on Power BI its such a simple feature.

 

Edit- It doesn't have to pull everything down but it does cast have to cast the date and then do the calculation before returning the subset. This has quite an impact on my instances CPU usage, so several users trying to refresh this simulatously would probably lock thing up for a while. If i nest this inside a year page level filter it doesn't nest it properly in the sql statement I believe.

 

 

andre
Memorable Member
Memorable Member

I don't believe you can do much with REST API to help with Q&A... Somehow Q&A should be smart enough to filter the time dimension correctly for Today vs. Yesterday...

I'm not sure I'm being understood.

 

I'm not questioning the ability to get data into PBI via REST.  I've accomplished that with Rui's PowerBI REST app.  I have data streaming into PBI every 10 seconds using the BasicFIFO option in the API via PowerShell.  Been running for 2 weeks.

 

Below.  To my original point, you CAN use dynamic features like "today" and "yesterday" in QA off this dataset - see pic.  It works.  If I replace "YESTERDAY" with "TODAY" in the Q&A line - magically, all my data filters for 7/14 instead of 7/13.  It's like a magic hidden feature that you can't choose in the filter UI, (though you even get a filter (see blue lines) on the nav oddly.)

 

The issue is that AFTER you've created this visual just as I've typed it and click "Pin" - there seems to be a bug in the dashboard, because over the course of a day or so it forgets to apply the timestamp filter that it was able to create in the first place.

 

So, is this a hidden feature of the Q&A experience - that perhaps only works on non-PowerPivot data?  If so, why is it hidden?  Why not a filter option that one can choose without having to type "for today"?

 

-Eric.

 

 

Capture1.PNG

When you bring in a new source there are multiple Date Filters you can apply. Including one for "Yesterday" Is this what you were looking for?

 

Yesterday.png

ashishrj
Power Participant
Power Participant

As far as I know and as far as I have been working with Power BI, Q&A feature in web purely works on dax measure and calculated columns created for the query fired. For eg in your case if you would have been created a measure to calculate value for yesterday based on 'calculate' dax function for filter expression as 'today-1' then it would work!

In my case, I’m using data pumped into PowerBI via this solution:  https://ruiromanoblog.wordpress.com/2015/03/03/create-a-real-time-it-dashboard-with-powerbips/ 


Rui Romano's solution for an IT Monitoring data-feed has a simple column called "TimeStamp" in DateTime format. This is the column I’m referring to in my Q&A statement.  No powerpivot, no DAX and no measures per se.

 

With this data set, the Q&A statement "for today" or "for yesterday" works.  You can see this happen if I turn my data into a table.  As you type "for yesterday" in the Q&A bar, you'll immediately see data for...yesterday.  It's quite elegant and intuitive actually.  It works the way it should work.  The problem is – as I stated above – that it bug’s-out after you pin it.

 

I do however understand your point about creating a calc’d column in a PowerPivot/PBIDesigner Data model.  I’ve created several filter columns: “Is current month (y/n)”, “Is current quarter (y/n)”, “Today” and so on.

 

I hope someone figures this out for real-time datasets that don’t have the benefit of DAX.  Having dynamic filters to control a date column would be nice.
-Eric

@Evogelpohl The only solution is to use REST API. You will get real time UPDATED data. Find the link given.

Overview of Power BI REST API

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Solution Authors
Top Kudoed Authors