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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
pbidemouser2
Helper II
Helper II

Display the last 5 datapoints in plot

Hi guys,

 

I have a live dataset like this,

 

Timestamp        Value

2020/06/17 1:00    12

2020/06/17 2:00    19

2020/06/17 3:00    1

2020/06/17 4:00    11

2020/06/17 5:00    19

2020/06/17 6:00    8

2020/06/17 7:00    2

2020/06/17 8:00    3

2020/06/17 9:00    4

 

I want to display this whole data as one line in a plot. And in another line i want to display only the last 5 points in different color. Is there any measure for that?. Or is it possible to show the last 5 points in different color within the same line itself?.

 

Thanks,

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi @pbidemouser2 

For show last 5 data, you could try this formula:

last 5 data = IF(RANKX(ALL('Table'[Timestamp]),CALCULATE(MAX('Table'[Timestamp])),,DESC)<=5, CALCULATE(SUM('Table'[Value])) )

 

Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi @pbidemouser2 

For show last 5 data, you could try this formula:

last 5 data = IF(RANKX(ALL('Table'[Timestamp]),CALCULATE(MAX('Table'[Timestamp])),,DESC)<=5, CALCULATE(SUM('Table'[Value])) )

 

Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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