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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
muhamazh
Frequent Visitor

Filter 0 and smallest value greater than zero from dataset

Hello there,

I have a dataset that contains the following:

pbiquery.png

 

I only want to take the time value 0 and one value greater than zero from the dataset.

We can filter for any value greater than or equal to zero but what would be the way to filter only one value greater than zero for each Event? Thanks

3 REPLIES 3
tamerj1
Super User
Super User

Hi @muhamazh 

in general you can first filter out the negative time values then calculate the TOPN ( 2, of the filtered table,  [Time], ASC )

what is the expected result?

It only displays the first two from all the table. But I want the first two values from each Event. Like 2 for A, 2 for B, 2 for C etc. Thanks

@muhamazh 
Yes indeed you are right. So the table that you need to filter should be CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Event] ) ). There is more t be done here but do this first and let me know what do you get.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.