Dax measures total mismatch in visual level
Hi Team,
I have below dax measures as follows:
Forecast – Target Units_1 =
VAR _DailyUnits = [Target consumption per day_1]
RETURN
SUMX(Points,
SUMX(Calendar_,
IF(ISBLANK([Actual Units]),_DailyUnits
)))
Referenced above measure ‘Target consumption per day_1′ comes from below:
Target consumption per day_1 =
VAR minDate = MIN ( ‘Calendar_'[Date] )
VAR maxDate = MAX ( ‘Calendar_'[Date] )
RETURN CALCULATE (
SUMX (
TargetTimeSeries,
VAR _Days = TargetTimeSeries[EndDate] – TargetTimeSeries[StartDate] +1
VAR Result = TargetTimeSeries[Usage] / _Days
RETURN Result
),
REMOVEFILTERS ( ‘Calendar_’ ),
KEEPFILTERS ( TargetTimeSeries[EndDate] >= minDate ),
KEEPFILTERS ( TargetTimeSeries[StartDate] <= maxDate ),
TargetTimeSeries[TargetType] = 1
)
The result(Duplicate of Page 3) tab is as below:
Please advise!
PFA file here Portfolio Performance – v2.13 – Copy.pbix
Thanks in advance!
Hi Team, I have below dax measures as follows: Forecast – Target Units_1 =
VAR _DailyUnits = [Target consumption per day_1]
RETURN
SUMX(Points,
SUMX(Calendar_,
IF(ISBLANK([Actual Units]),_DailyUnits
))) Referenced above measure ‘Target consumption per day_1’ comes from below: Target consumption per day_1 =
VAR minDate = MIN ( ‘Calendar_'[Date] )
VAR maxDate = MAX ( ‘Calendar_'[Date] )
RETURN CALCULATE (
SUMX (
TargetTimeSeries,
VAR _Days = TargetTimeSeries[EndDate] – TargetTimeSeries[StartDate] +1
VAR Result = TargetTimeSeries[Usage] / _Days
RETURN Result
),
REMOVEFILTERS ( ‘Calendar_’ ),
KEEPFILTERS ( TargetTimeSeries[EndDate] >= minDate ),
KEEPFILTERS ( TargetTimeSeries[StartDate] <= maxDate ),
TargetTimeSeries[TargetType] = 1
) The result(Duplicate of Page 3) tab is as below: Expected output total from Forecast – Target Units_1 should add up(4978+4037) to give 9015 in total.But the measure total displays as 18,030(guess so) which is not correct & what we wanted. Another example for above total mismatch is as below: I think its to do with filter context but am struggling to work it out. Please advise!PFA file here Portfolio Performance – v2.13 – Copy.pbix Thanks in advance!@SergeiBaklan Read More