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