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
denxx34
Frequent Visitor

Filter or group elements of a table, but keep the info in Power BI Desktop

Hello @ all ,

I have the following table and would like to filter or aggregate the table according to the MIN (DurationSec) criterion. As a result, the fastest route should come out per name (with station).

 

In this case, I don't really care whether M or DAX.

 

INPUT:

NameStation.NameRoute.DistanceMeterRoute.DurationSec
RumboSouth3193465
RumboNorth5415748
RumboReha 28501877
RumboMiddle11277981
RumboReha 17187990
RumboWest97191193
TollNorth10203728
TollReha 110410930
TollWest13273996
TollMiddle2858462
TollReha 24215764
TollSouth8601709

 

OUTPUT shoulb be:

NameStation.NameRoute.DistanceMeterRoute.DurationSec
RumboSouth3193465
TollMiddle2858462

 

Can someone help me please.

It's not possible to use GroupBy or SUMMARIZE().

 

Peace.

2 ACCEPTED SOLUTIONS
v-diye-msft
Community Support
Community Support

Hi @denxx34 

 

Let me know if you'd like to get below results:

Measure = var a = CALCULATE(MIN('Table'[Route.DurationSec]),ALLEXCEPT('Table','Table'[Name]))
Return
IF(MAX('Table'[Route.DurationSec])=a,a,BLANK())

 005.PNG

Pbix attached.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

denxx34
Frequent Visitor

Problem resolved as follows:

 

0. "INPUT" (raw data)
1. Reference with Group by Name MIN(DurationSec) "InputBest"
2. INNER JOIN "INPUT" + "InputBest" over Name & DurationSec -> OUTPUT


See .pbix attachment

In my opinion, that's the solution.

 

P.S.

How can I offer the pbix file as a download? 😐

View solution in original post

4 REPLIES 4
denxx34
Frequent Visitor

Problem resolved as follows:

 

0. "INPUT" (raw data)
1. Reference with Group by Name MIN(DurationSec) "InputBest"
2. INNER JOIN "INPUT" + "InputBest" over Name & DurationSec -> OUTPUT


See .pbix attachment

In my opinion, that's the solution.

 

P.S.

How can I offer the pbix file as a download? 😐

v-diye-msft
Community Support
Community Support

Hi @denxx34 

 

Let me know if you'd like to get below results:

Measure = var a = CALCULATE(MIN('Table'[Route.DurationSec]),ALLEXCEPT('Table','Table'[Name]))
Return
IF(MAX('Table'[Route.DurationSec])=a,a,BLANK())

 005.PNG

Pbix attached.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Greg_Deckler
Community Champion
Community Champion

Seems like you can use Name in a Table visualization and then use standard MIN for distance and duration. Then perhaps this for station: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/td-p/985814



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler ,

 

Thanks for your quick reply.
However, I do not need a measure, but a solution for the whole table, which I then reuse in other scenario.

 

Do you have another idea?

 

Thanks.

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