Forum Discussion
DanErickson
2 years agoFrequent Visitor
Circular Dependency Issue
I am creating multiple Calculated Columns in a table, so I am running into circular dependancy issues. I have ready everything that I can on how to fix this (understanding that creating more that on...
- 2 years ago
ChatGPT just provided me with a working solution. My final DAX looks like:
EP Aud 1100 Categories =VAR __VALEP = [East Paris]VAR __EP_Aud_Cap = CALCULATE([EP Aud Cap], REMOVEFILTERS(Aud1100))RETURNSWITCH (TRUE (),__VALEP <= (.4*__EP_Aud_Cap), "Low",__VALEP <= (.6*__EP_Aud_Cap), "Moderate",__VALEP <= (.8*__EP_Aud_Cap), "Ideal",__VALEP <= __EP_Aud_Cap, "High",__VALEP >= __EP_Aud_Cap, "Over Capacity",BLANK ())
DanErickson
2 years agoFrequent Visitor
The [CC Aud 1100 Categories] is the first calculated column. I agree that the error is saying it is dependent on that column, but they don't reference each other at all. They both use the same DAX, just pointed to different references. My understanding is that once you have one calculated column, it changes the filter context, so other calculated columns become dependent, even if there is no actual circular reference. This is what I am trying to fix.
DanErickson
2 years agoFrequent Visitor
ChatGPT just provided me with a working solution. My final DAX looks like:
EP Aud 1100 Categories =
VAR __VALEP = [East Paris]
VAR __EP_Aud_Cap = CALCULATE([EP Aud Cap], REMOVEFILTERS(Aud1100))
RETURN
SWITCH (
TRUE (),
__VALEP <= (.4*__EP_Aud_Cap), "Low",
__VALEP <= (.6*__EP_Aud_Cap), "Moderate",
__VALEP <= (.8*__EP_Aud_Cap), "Ideal",
__VALEP <= __EP_Aud_Cap, "High",
__VALEP >= __EP_Aud_Cap, "Over Capacity",
BLANK ()
)