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 to all the community,
I am trying to use DAX to return a result between two tables not directly connected between each other.
Table 1
Name | Job | Level |
Alan | Accountant | I |
Mark | Accountant | II |
John | Manager | III |
Job List
Job | I | II | III |
Accountant | B | C | D |
Manager | D | E | F |
By taking the parameters Job + Level, I would like to return the corresponding value for each name based on level
Table 1
Name | Job | Level | Value |
Alan | Accountant | I | B |
Mark | Accountant | II | C |
Current solution that I have found is to do a lot of nested lookupvalues
Hi @RobWayne -
Unpivoting Job List is the first step. You want the data to look like this:
Job | Level | Value |
Accountant | I | B |
Accountant | II | C |
Accountant | III | D |
Manager | I | D |
Manager | II | E |
Manager | III | F |
Then the DAX should be straightforward
JobValue =
LOOKUPVALUE (
JobList[Value],
JobList[Title], Table1[Title],
JobList[Level], Table1[Level]
)
Hope this helps
David
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |