Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi all
I am building a new column on the table SKU by line - Official, which basically is a multiplication of:
A measure [BPM conversion]* a calculated column [Mix by product] * Max available time * Total hours to discount
The error I get is the following:
A circular dependency was detected:
I attach the pbix to better visibility. The syntax from my point of view is correct but don't know what could be wrong.
https://1drv.ms/u/s!ApgeWwGTKtFdh13Pj8JD18lE9HC8?e=XhCfRd
Regards.
Hi @PaulDBrown
I understood from the video that I need to reduce dependency list of the column, to consider only the needed column.
I am doing the all except in my 'Mix' calculated column and still not working.
So, on excel would be this:
And translated to dax I get:
The error on my 'Capacity' calculated column is directly related to my Mix calculated column above.
The capacity column is not a calculate function, just an IF. So I guess the root cause must be on the mix column.
Do you know what can I do based on my code?
Thanks.
I would try wrapping the IF column in CALCULATE with ALLEXCEPT. Actually, you should do so with all calculated columns: the video states that all calculated columns need the ALLEXCEPT
Proud to be a Super User!
Paul on Linkedin.
Hi @PaulDBrown
If I try to wrap the if colum with calculate, this happens:
Columns are underlined with red.
Regards.
Apologies since I can't see the image clearly. However, try putting the IF expression in a VAR and then do the CALCULATE with ALLEXCEPT as the RETURN expression
Proud to be a Super User!
Paul on Linkedin.
Hi @PaulDBrown
You can click on the image and it will expand. What column should I use within allexcept?
Please click in image below to zoom in:
Regards.
Yes, sorry, I was posting from my phone so couldn't see the image clearly.
I would try the 'SKU by line - Official' [Month] field for the ALLEXCEPT. It's hard to tell because not all the table fields are visible in the image).
Ideally it should be the field with the highest granularity in the table.
Proud to be a Super User!
Paul on Linkedin.
Hi @PaulDBrown
Can you please have a look at my pbix?
I don't know how to use calculate + allExcept with an if function:
Can you please further advise?
Thanks!
OK, first of all, can you check both calculated columns? they appear to calculate the same value.
Secondly, is there a particualr reason you need these calculations as calculated columns? they appear to be best suited as measures (unless you are going to filter by the resulting values)
To answer your question, this code works:
Proud to be a Super User!
Paul on Linkedin.
hi @PaulDBrown
Yes, I might need to filter by the resulting value too.
I tried your code but it still says there is a circular dependency 😞
Please see attached the pbix updated.
When you say both columns calculate the same value, what do you mean?
Thank you for the help, really apppreciate it.
Hi @PaulDBrown '
Did you have a chance to see the pbix above? The error still displays with your code.
Regards.
Check out this video by the gurus at sqlbi.com on circular dependencies:
Proud to be a Super User!
Paul on Linkedin.