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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

data for last N run ids

my data looks like this

 

grade id, run id, timestamp, categoryid, measurevalue, speedvalue, 

 

i need to create a following measure, which will show all values for measurevalue with following condition, what is the best way to do it?

 

1- pick last 5 runs (run ids are usually incremental ids) 

2- where categoryid = xyz

3- where grade id = abc

4- where speed value > 150

 

1 ACCEPTED SOLUTION
LivioLanzo
Solution Sage
Solution Sage

The final measure depends on your Matrix. 

The Top 5 table can be calculated like this:

 

 

=
TOPN (
    5,
    CALCULATETABLE (
        Data,
        Data[categoryid] = "xyz",
        Data[grade id] = "abc",
        Data[speed value] > 150
    ),
    Data[run id], DESC
)

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

1 REPLY 1
LivioLanzo
Solution Sage
Solution Sage

The final measure depends on your Matrix. 

The Top 5 table can be calculated like this:

 

 

=
TOPN (
    5,
    CALCULATETABLE (
        Data,
        Data[categoryid] = "xyz",
        Data[grade id] = "abc",
        Data[speed value] > 150
    ),
    Data[run id], DESC
)

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors