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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Display recent data in table visual (Direct Query Mode)

Hello,

 

I have a Dataset for a day which contains sensor data generated for each five minutes.

I need to display recent sensor data in table visual.

Am using Direct Query mode.

I tried Max function but those are not accepted in direct query mode. Please suggest an alternate solution to this.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I just thought of trying a workaround, added a coloumn in sql query itself, the column will have binary data 0 or 1 based on the timestamp.

 

I have used the same column to filter it in visual. It worked.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

You can consider writing a measure formula to get last record id based on categories and conditions, then use this value to compare with current row contents to return tag. (Y/N) Then you can apply this measure on the 'visual level filter' to filter unmatched records.
If you confused about coding formula, please share some sample data with minimum data structure and expected result for the test.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @Anonymous ,

 

Thanks for your reply, I guess the measure will work if we need to display only one record.

 

But in my case I need to display multiple parameters values which is generated recently from the sensor.

 

So atleasat there are 10 Parameters, for which data is generated for evey 2 minutes. Please let me know if I create a measure will it work for multiple Parameters.

Anonymous
Not applicable

Hi @Anonymous ,

 

I just thought of trying a workaround, added a coloumn in sql query itself, the column will have binary data 0 or 1 based on the timestamp.

 

I have used the same column to filter it in visual. It worked.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.