March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello
I have two tables that are related (they are related by a Job number)
Authority GIS (with a field called authority) and SAW (with a field called Location_of_job)
I've been trying to do the following IF statement to create a new column with a job location. I want a new column in the Authority table which contains the authority field value from Authority GIS if is not 'Not-recorded' but contains the Location_of_job value from the SAW table if it is 'Not-recorded'.
Job_Location = IF(AUTHORITY <> "Not_recorded", AUTHORITY, Location_of_job) this isn't working and the error message is Cannot find name 'Location_of_job'
Any idea what I'm doing wrong? Does this not work with two tables?
Thank you!
Solved! Go to Solution.
Hi @Henry44 ,
You must have the Job_location column in the Authority table. For this you can bring in this column from the SAW table using LOOKUPVALUE Function, and then try using the DAX (Job Location field must be from Authority table).
Create column in AUTHORITY:
Job_Location= LOOKUPVALUE(Location_of_Job, Authority(Job number), SAW(Job number))
Once this column is created, you can use your DAX:
Job_Location2 = IF(AUTHORITY <> "Not_recorded", AUTHORITY, Job_Location)
I hope this helps!
Hi @Henry44 ,
You must have the Job_location column in the Authority table. For this you can bring in this column from the SAW table using LOOKUPVALUE Function, and then try using the DAX (Job Location field must be from Authority table).
Create column in AUTHORITY:
Job_Location= LOOKUPVALUE(Location_of_Job, Authority(Job number), SAW(Job number))
Once this column is created, you can use your DAX:
Job_Location2 = IF(AUTHORITY <> "Not_recorded", AUTHORITY, Job_Location)
I hope this helps!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
22 | |
19 | |
16 | |
9 | |
5 |
User | Count |
---|---|
37 | |
29 | |
16 | |
14 | |
12 |