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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
gsksarepta
Helper II
Helper II

Filter chart to show last 30 rows on x axis from data

I have sql dataset that appends every week with new manufacturing data. However, I would like to show only last 30 lots of data on line charts. Can I know what are the options to get this type of filtering from the whole dataset? 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@gsksarepta , if lot number is sort able the create a new column

 

Lot Rank = Rankx(Table, Table[Lot Number],,desc, dense) //use skip if needed

 

You can use filter at page level rank <=30

 

you can create a measure, that can use in visual or visual level filter

 

calculate(sum(Table[Value]), filter(Table, Table[Lot Rank] <=30) )

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@gsksarepta , if lot number is sort able the create a new column

 

Lot Rank = Rankx(Table, Table[Lot Number],,desc, dense) //use skip if needed

 

You can use filter at page level rank <=30

 

you can create a measure, that can use in visual or visual level filter

 

calculate(sum(Table[Value]), filter(Table, Table[Lot Rank] <=30) )

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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