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.
Hi, i need help with this.
i have a flight data table with column name AirportFrom and another AirportTo, columns has IATA code(Airport Code).
my Goal is to show the Flight routes on a FLow map Visual.
To do this, i would like to use the Airport name instead of Airport Code.
so, i overlayed a Dataset that has the Airportcode, Airport Names, Longitudes and Latitudes.
and Built a data Model with it.
then i tried to Create two custom columns named AirportOrigin and Airport Destination in the flight Dataset to retrieve the Airport Names from the Overlayed table.
but i've got it all wrong with this.
My wrong solution
I would be so grateful, if i can solve this.
probably in a more efficient way.
Solved! Go to Solution.
Hi, @driplytics
Delete the relationship/add a new seperate table and then try calculated columns as below:
AirportOrigin = LOOKUPVALUE('Airport Data'[name],'Airport Data'[iata_code],'Dataset'[AirportFrom])
Airport Destination = LOOKUPVALUE('Airport Data'[name],'Airport Data'[iata_code],'Dataset'[AirportTo])
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @driplytics
What dax code did you use? which error did you get? which column connects the two tables?
thank you @tamerj1 for ypur response.
Here's Dax i used to Create the 2 Custom columns
@driplytics
Please refer to sample file with the solution https://we.tl/t-GJkiT6Ovta
thanks @tamerj1 , i think you are close to the solution.
but instead of returning same Iata_code (Eg in the pics below, ATL is an Airport code), i want the name returned (Hartsfield Jackson Atlanta International Airport) on the custom columns.
Hi, @driplytics
Delete the relationship/add a new seperate table and then try calculated columns as below:
AirportOrigin = LOOKUPVALUE('Airport Data'[name],'Airport Data'[iata_code],'Dataset'[AirportFrom])
Airport Destination = LOOKUPVALUE('Airport Data'[name],'Airport Data'[iata_code],'Dataset'[AirportTo])
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |