Forum Discussion
analyticspbi87
Helper I
1 year agoCircular Dependency when using variable in measures
Hi there, Currently, I'm trying to get two different measures to show as follows and am getting an error on the second variable. Building Year Value Type Cost Type Value Thousands Group...
- 1 year ago
You have a couple of typos in your formulas, but there is no circular dependency anywhere.
% of TOTAL A = VAR ANUMERATOR = DIVIDE ( CALCULATE ( SUM ( 'Data'[Value] ), 'Data'[Group] <> "A", 'Data'[Type Cost] = "Add Year" ), 1000 ) VAR ADENOMINATOR = DIVIDE ( SUM ( 'Data'[Multiplier] ) * SUM ( Data[ TOTAL A ] ), 1000 ) RETURN DIVIDE ( ANUMERATOR, ADENOMINATOR ) % of TOTAL B = VAR BNUMERATOR = DIVIDE ( CALCULATE ( SUM ( 'Data'[Value] ), 'Data'[Group] <> "A", 'Data'[Type Cost] = "Add Year", 'Data'[Type] = "Non-Recoverable" ), 1000 ) VAR BDENOMINATOR = DIVIDE ( ( SUM ( 'Data'[Multiplier] ) * SUM ( 'Data'[ TOTAL B ] ) ), 1000 ) RETURN DIVIDE ( BNUMERATOR, BDENOMINATOR )
Anonymous
1 year agoNot applicable
Hi, analyticspbi87
Do you have to use calculated columns, please? Can you use Measure?
Can you share the results you expect to get and the logic behind the calculation?
We will do our best to help you solve the problem you are having.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.