Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I'm getting a circular dependency error that I can't figure out for the life of me. To start, I have a fairly simple formula to calculate a value on a daily basis:
(field1 + field3)/ (field1 + field2) |
I want to display that as a daily value, as well as month-to-date and year-to-date. Using my actual field names, this is the formula:
Solved! Go to Solution.
Hi Alex,
If we delete the column [oe_wo_mtd_compare], the [YTD Var] should work. I think you should create a measure instead. Which reference isn't available? Is it below you need?
It's better to create a date to work with the time intelligence functions.
Best Regards,
Hi Alex,
Did you create a column instead of a measure accidentally?
Can you share a sample? Please mask the sensitive data first. Just see from your formula, it's simple and clear.
Best Regards,
Sorry, I forgot to include the file, which is here.
I created a column rather than measure because not all of the fields I wanted to reference were available when I tried to use a measure - that must be part of the problem. I spent some time this weekend learning DAX a little more deeply to see if I can get to the bottom of this, and suspect that the problem is that when I compare my MTD or YTD fields to the target value, the target value isn't an aggregate, it's just a static field on every row of data. So with MTD and YTD being aggregates, I'm thinking Power BI may not be able to find a specific row to get the target from. I'm going to try applying an average to that field and see if that might work.
If you do have time to take a look and can offer any other insight, it's much appreciated!
thanks
Alex
Hi Alex,
If we delete the column [oe_wo_mtd_compare], the [YTD Var] should work. I think you should create a measure instead. Which reference isn't available? Is it below you need?
It's better to create a date to work with the time intelligence functions.
Best Regards,
@v-jiascu-msft thanks for your help. I was able to get it all working! Once I studied up on DAX I realized I was trying to compare DAX measures to static fields, which of course caused problems, due to no current row, etc.
Finally done, woo-hoo!
Hi Pozzyal,
Can you tell me what you did exactly to tackle the circular dependency error as I am facing the same issue while creating YTD values for my table.
Any response will be highly appreciated.
Thanks ,
Preetinder
In my case my YTD and MTD measures worked fine, but I then needed to compare them to another target column to determine the variance. But the other column wasn't a measure. So since my YTD and MTD fields were aggregates, they didn't have a single row to compare to in my target. Does that make sense?
User | Count |
---|---|
101 | |
90 | |
79 | |
70 | |
70 |
User | Count |
---|---|
112 | |
96 | |
96 | |
75 | |
72 |