Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
My target is to make a card showing the fastest airline (so extract top 1 row, with minimum time)
This is how my data looks,
I am struggling to convert 'Flight_duration' column into a measure with same values, so I can then use a MINX function over it to create a min_duration measure, which I can later use to compare and use topN fucntion to just show the first value.
I have a 'flight duration' column in my table.
Thank you for your reply.
What you suggested, apparently creates a measure with max values. What I am doing / trying to do is this:
1. Convert somehow flight_duration column into a measure.
tried this
min = MIN('Indian Airlines'[Flight_duration])
2. Create a new measure to find the minimum value
min_fly_time = MINX(
ALLSELECTED('Indian Airlines'[airline]),[min]
)
3. Find / extract top (minimum value)
Fastest_flight = //to check minimum time required by flight
CALCULATE([min_fly_time],
TOPN( 1,
FILTER(
VALUES('Indian Airlines'[airline]), [min_fly_time] = [min]
), [airline]
)
)
Can you spot where I am going wrong? I am unable to achieve the goal of extracting the top row.
hi, @divergent
update your second measure to below
min fly =
CALCULATE(MIN(flight[flight duration]),REMOVEFILTERS(flight[flight duration]))
Thank you that helps, but not entirely.
Right now I am getting this
However, I am seeking to get the output as airline name corresponding to this min_fly_time.
My apologies for being a troublemaker 🙂
Is there anyway, I could only get 'spice jet' as output that corresponds to the lowest value 1.6 in your final column, as that is exactly what I am trying to achieve.
We are getting close 🙂
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |