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
sathiyen
Helper I
Helper I

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

Hi @v-shex-msft ,

 

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
v-shex-msft
Community Support
Community Support

Hi @sathiyen ,

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft ,

 

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.

Hi @v-shex-msft ,

 

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