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! Learn more

Reply
Anonymous
Not applicable

Filter table to get rows based on distinct values in column

Hi all!

 

I had searched but do not seem to find a solution. Please help?

 

I have the following table (sample) and need a Measure to sum up the duration for  distinct IDs only i.e. (10 + 13 + 5 + 4 = 32 minutes). How do I do that?

 

ID           Duration (minutes)

101         10

101         10

130         13

130         13

130         13

142         5

165         4

165         4

 

Thanks in advance!

 

Regards,

Yee Pin

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @Anonymous 

Assuming duration is always the same for a specific ID:

Measure =
SUMX ( DISTINCT ( Table1[ID] ), CALCULATE ( MIN ( Table1[Duration] ) ) )

 

View solution in original post

3 REPLIES 3
AlB
Community Champion
Community Champion

Hi @Anonymous 

Assuming duration is always the same for a specific ID:

Measure =
SUMX ( DISTINCT ( Table1[ID] ), CALCULATE ( MIN ( Table1[Duration] ) ) )

 

Anonymous
Not applicable

@AI  Awesome! Thank you so much!!

Anonymous
Not applicable

Hi,

You can create a measure as below. This will work even if the values are different.

 

total =
VAR distinct_sum = SUMX( SUMMARIZE( Data, Data[ID], Data[Duration] ), Data[Duration] )
RETURN
distinct_sum

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.

Top Solution Authors