Forum Discussion
Why do I get Circular Dependancy
- 3 years ago
rpinxt I agree with m_alireza. Also, any specific reason why you went with Calculated Columns instead measures?
I rewrote the logic as a measure for you. Check if this meets your requirementReworked Qty <50__ = VAR Result = CALCULATE( [Quantity], FILTER('AVN Rework Merge', 'AVN Rework Merge'[Flow] = "Reworked" && [Amt USD] > -50) ) RETURN COALESCE(Result,0)
rpinxt Instead of referencing the measure [FinAmtUSD], try referencing the column directly instead.
so:
- SivaMani3 years ago
Resident Rockstar
rpinxt I agree with m_alireza. Also, any specific reason why you went with Calculated Columns instead measures?
I rewrote the logic as a measure for you. Check if this meets your requirementReworked Qty <50__ = VAR Result = CALCULATE( [Quantity], FILTER('AVN Rework Merge', 'AVN Rework Merge'[Flow] = "Reworked" && [Amt USD] > -50) ) RETURN COALESCE(Result,0)- rpinxt3 years ago
Solution Sage
SivaMani m_alireza I want to thank you both because both solutions seem to work! 😁
Well I chose for calculated column because I merged two sources and thought to get the correct amount on every line a calculated column would be better.
Also I tried a measure before but could not succeed 😑
Must say I do not fully understand your measure.
What does COALESCE do?
And what would you guys think is best in ways of performance?
Would the measure be better (lighter) on the data then the calculated columns?
- SivaMani3 years ago
Resident Rockstar
rpinxt, You're welcome!
COALESCE - If the first expression is BLANK, it returns zero. It is nothing but IF(ISBLANK(Result),0, Result )Calculated Columns vs Measures -Both have their own use cases.
Refer the below URLs for more info - https://community.powerbi.com/t5/Desktop/column-vs-measure/m-p/13203/highlight/true#M3305