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
Hey drew989898 ,
Let me clarify:
-
If you use CALCULATETABLE inside a measure, it will be calculated on the fly, no data will be written to the model.
-
If you use CALCULATETABLE to create a new table in the model, then of course the data will be stored.
My PBIX works as expected. The start date calulated isn't always the same.
You mentioned: “if the current start time is less than the start time of type availability, then take the start time of availability, otherwise take the current start time.”
That’s exactly what I did in the file.
If instead you want the opposite logic, you just need to switch the IF statement.
Did you check both the measure I built and the calculated columns?
Look at my output
It's exactly aa the table you provided. I re-attached in the previous post the PBIX with the IF statement switched. Take a closer look and let me know. 😉
Ps. I made the measure just for start date just to let you see how it works. difference measure is your Revised Start Date-Time