Forum Discussion
Error: A circular dependency was detected
- 11 months ago
Hey buddy,
I’m not completely sure I understood all the requirements. Assuming you have a key on emp id, I created a file for you, please take a look and let me know.
I should mention that if you create a table using CALCULATETABLE, the data will actually be stored in the model. That makes me wonder if maybe you’d prefer to do it using only a measure instead.EDIT: I updated the file, I put also a measure to do the calculation you need. Let me know if this solve your issue
Hi Gabry,
This is exactly the solution.
Previously I was getting this, which is only returning the initial start time:
Now I can see exactly what I need to! As you say, difference measure is the revised start time now 🙂
It seems that lookupvalue is the game changer doing what I was previously trying to do with a calculated table, instead via a calculated column which is much better. I will need to look into this much more.
Thanks so much!
Drew
Cool, I'm happy to hear that!
Keep in mind that the LOOKUP DAX function isn't supported when the table is in DirectQuery mode. Also, it's considered best practice not to add calculated columns to DirectQuery tables. If you plan to use the source table in DirectQuery mode, it's better to use a measure instead.
- drew98989811 months agoFrequent Visitor
No worries. This is easy enough to convert to a measure using MAX(), which seems to work well enough.
Start date-Time availability2 = LOOKUPVALUE('Table'[Start Date-Time],'Table'[Emp ID],MAX('Table'[Emp ID]), 'Table'[Type], "Availability")
So I think I can forge ahead with this solution!
If I were able to do some of this ETL stuff with SQL that would be great. But I'm limited to power query and DAX.
Thanks again, Drew.