Forum Discussion
lookupvalue circular dependency error
Yes, but I'm only able to do it using active relation. Table 2 contains only those keys, and I need to know which of them are listed in all 4 keys from Table 1. Comparing row by row is not an option, as there is too much data, and it has to be done automatically.
In Excel I would just create another 4 columns, with vlookup function to each key, and then just merge everything to one column. But in DAX I can't do it as I'm receiving circular dependency error...
EDIT:
Ok, I found one solution, but it's not really sophisticated, and I'm not sure how it will handle large data model. On top of that, I prefer to know if two keys from one row were listed in Table 2. Does anyone have idea how to handle it in easier way?
result = IF(LOOKUPVALUE('Table 2'[key];'Table 2'[key];'Table 1'[1st key])<>"";LOOKUPVALUE('Table 2'[key];'Table 2'[key];'Table 1'[1st key]);
IF(LOOKUPVALUE('Table 2'[key];'Table 2'[key];'Table 1'[2nd key])<>"";LOOKUPVALUE('Table 2'[key];'Table 2'[key];'Table 1'[2nd key]);
IF(LOOKUPVALUE('Table 2'[key];'Table 2'[key];'Table 1'[3rd key])<>"";LOOKUPVALUE('Table 2'[key];'Table 2'[key];'Table 1'[3rd key]);
IF(LOOKUPVALUE('Table 2'[key];'Table 2'[key];'Table 1'[4th key])<>"";LOOKUPVALUE('Table 2'[key];'Table 2'[key];'Table 1'[4th key]);""))))
EDIT 2:
Unfortunately, above solution also didn't work for me. This result has to be linked with [Table 2], creating relation based on this calculated column returns with an error. Anyone has any idea?
Hi, I was getting this error because my lookup reference was part of pervious lookup result (I hope I am not adding confusion). This error can be easliy resolved by Duplicating reference table and build new relationship. once relationships are eshtablished you can use lookup function to refer resultcolumn from duplicate table this will not create circular error.
Try this! this worked for me perfectly, hope this will work for you as well..!!