I am very new to Power BI and I am trying to do a rankx to determine the ranking of instock % by vendors.
I have three columns: vendor, count, and instock. I created a third column below to calculate my instock % :
Instock % = CALCULATE(DIVIDE(sum('In Stock'[Instock]),SUM('In Stock'[Count])))
I then try the following to rank my vendors by their instock %, but return "A circular dependency was detected: In Stock[Instock %], In Stock[rank vendor], In Stock[Instock %]."
: rank vendor = RANKX(ALL('In Stock'[vendor]),'In Stock'[Instock %],,DESC)
What am I doing wrong?