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
shb
Frequent Visitor

TopN DateTime column values

Hi,

 

I have a dataset with DateTime and Reading (int) columns. I want to show the readings over the time axis as a line graph but only for last 50 datetime values as the data is too large to show in the line graph and the user is only interested to see last 50 values. I am not sure if I can use the RANKX function as follows? This does not work as it ask to provide some aggregate function around datetime field that I am not sure which one should it be. 

 

Rank = RANKX(ALL(DatasetName), DatasetName[Datetime])  

 

Could you please suggest any alternative to achieve the above?

2 REPLIES 2
Eric_Zhang
Employee
Employee

@shb

 

You can set TOPN filter, see attached sample.

Capture.PNG

Thanks @Eric_Zhang For some reason this filter was not working on the real-time streaming dataset (on datetime field), it doesn't return anything. But for static dataset the filter does work fine. Do you know why it wouldn't work on the streaming data? Thanks

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 Kudoed Authors