Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi folks,
I have a fact table for Flights (Called 'Flights') and a dimension table containing Airports (Called 'Airports').
I'd like to create DAX measures (Not a calculated table column), which I can use in a table visual, which allow me to display data from the 'Flights' Table, but showing the IATA Codes of POD and POA instead of the AirportID values.
So basically I'd prefer this:
Over this:
I managed to do this with as calculated columns like below, but would prefer explicit DAX measures, which I can use with more flexibility.
POD IATA =
LOOKUPVALUE(
Airports[IATA],
Airports[AirportID], Flights[POD]
)
This looked like a promising solution, but produces an error "A table of multiple values was supplied where a single value was expected":
POD IATA =
CALCULATE(
VALUES(Airports[IATA]),
USERELATIONSHIP(Flights[POD], Airports[AirportID])
)
I have been searching the web for hours now for clues on what I did wrong here, but am probably asking Google the wrong questions.
Can anyone help me out with this?
Thanks.
Best regards
Patrick
Solved! Go to Solution.
@P_Allert
Please try:
POD IATA Measure =
VAR SelectedPOD = SELECTEDVALUE(Flights[POD])
RETURN
MAXX(
FILTER(
Airports,
Airports[AirportID] = SelectedPOD
),
Airports[IATA]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@P_Allert
Please try:
POD IATA Measure =
VAR SelectedPOD = SELECTEDVALUE(Flights[POD])
RETURN
MAXX(
FILTER(
Airports,
Airports[AirportID] = SelectedPOD
),
Airports[IATA]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi Fowmy,
thanks. It works beautifully. 👍
Best regards
Patrick
Hi @P_Allert
Did the solutions Fowmy and Greg_Deckler offered help you solve the problem, if them help, you can accept them as solutions so that more user can refer to. or if you have other problems, you can provide some informaiton so that can offer solutions for you.
Best Regards!
Yolo Zhu
@P_Allert You need to aggregate your VALUES somehow. Perhaps try to wrap it in a CONCATENATEX.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
144 | |
72 | |
63 | |
52 | |
48 |
User | Count |
---|---|
208 | |
89 | |
62 | |
59 | |
57 |