Forum Discussion
nish18_1990
1 year agoHelper III
remove circular dependency between measures
How can i remove circular dependency : Measure 1 HasLossAndGain = VAR ThisIncidentID = My_Main_Table[Incident ID] VAR HasLoss = CALCULATE( COUNTROWS('My_Main_Table'), ...
- 1 year ago
These look like calculated columns, not measures, but you should be able to remove the circular dependency error by changing the initial column to
HasLossAndGain = VAR ThisIncidentID = My_Main_Table[Incident ID] VAR HasLoss = CALCULATE ( COUNTROWS ( 'My_Main_Table' ), 'My_Main_Table'[Incident ID] = ThisIncidentID, 'My_Main_Table'[Financial Impact Type] = "Loss", REMOVEFILTERS ( 'My_Main_Table' ) ) > 0 VAR HasGain = CALCULATE ( COUNTROWS ( 'My_Main_Table' ), 'My_Main_Table'[Incident ID] = ThisIncidentID, 'My_Main_Table'[Financial Impact Type] = "Gain", REMOVEFILTERS ( 'My_Main_Table' ) ) > 0 RETURN HasLoss && HasGain
johnt75
1 year agoSuper User
These look like calculated columns, not measures, but you should be able to remove the circular dependency error by changing the initial column to
HasLossAndGain =
VAR ThisIncidentID = My_Main_Table[Incident ID]
VAR HasLoss =
CALCULATE (
COUNTROWS ( 'My_Main_Table' ),
'My_Main_Table'[Incident ID] = ThisIncidentID,
'My_Main_Table'[Financial Impact Type] = "Loss",
REMOVEFILTERS ( 'My_Main_Table' )
) > 0
VAR HasGain =
CALCULATE (
COUNTROWS ( 'My_Main_Table' ),
'My_Main_Table'[Incident ID] = ThisIncidentID,
'My_Main_Table'[Financial Impact Type] = "Gain",
REMOVEFILTERS ( 'My_Main_Table' )
) > 0
RETURN
HasLoss && HasGain
- nish18_19901 year agoHelper III
Thank you . It worked