Combining Two dax measures to avoid dax reference
Hi Team,
I have created two dax codes as below:
Related_(Target cost)_1 =
VAR TargetValue =
CALCULATE (
SUM ( Target[Value] ),
‘Target'[DBName-Point_id] = MAX ( ‘Accruals'[DBName-Point_Id] )
&& ‘Target'[TargetType] = 1
&& ‘Target'[month] = FORMAT ( MAX ( ‘Accruals'[Date] ), “mmmm” )
)
VAR days =
SUMX ( ‘Accruals’, TargetValue )
RETURN
–days/[no of days]
COALESCE ( days / [no of days], 0 )Target cost_1 =
SUMX ( ‘Accruals’, COALESCE ( [Related_(Target cost)_1], 0 ) )
Their results individually as shown below
Is it possible to merge these dax measures into a single dax ? Also, final values at the total & column will be same as below ?
I am doing this in order to avoid the reference of measures within another dax.
Please help me.
Thanks in advance!
Hi Team, I have created two dax codes as below: Related_(Target cost)_1 =
VAR TargetValue =
CALCULATE (
SUM ( Target[Value] ),
‘Target'[DBName-Point_id] = MAX ( ‘Accruals'[DBName-Point_Id] )
&& ‘Target'[TargetType] = 1
&& ‘Target'[month] = FORMAT ( MAX ( ‘Accruals'[Date] ), “mmmm” )
)
VAR days =
SUMX ( ‘Accruals’, TargetValue )
RETURN
–days/[no of days]
COALESCE ( days / [no of days], 0 )Target cost_1 =
SUMX ( ‘Accruals’, COALESCE ( [Related_(Target cost)_1], 0 ) ) Their results individually as shown below Is it possible to merge these dax measures into a single dax ? Also, final values at the total & column will be same as below ? I am doing this in order to avoid the reference of measures within another dax.Please help me. Thanks in advance!@SergeiBaklan Read More