Forum Discussion
danielpaduck
2 years agoHelper III
Calculate Question - How To Keep A Column Value In The Calculation
Hi, How is it possible to keep/evaulate the column 'Period' In my Calculate function? Labor Hours Conditional (D) = var minPeriod = CFGDates_Min_Max[Min Period (msr)] var ...
Anonymous
2 years agoNot applicable
Hi danielpaduck ,
Please try below dax formula:
Labor Hours Conditional (D) =
VAR minPeriod = MIN(CFGDates_Min_Max[Min Period (msr)])
VAR maxPeriod = MAX(CFGDates_Min_Max[Max Period (msr)])
RETURN
SUMX(
'LD Actual',
IF(
'LD Actual'[Period] = minPeriod,
'LD Actual'[Hours (Actual)],
IF(
'LD Actual'[Period] > minPeriod && 'LD Actual'[Period] <= maxPeriod,
CALCULATE(
SUM('LD Forecast'[Hours (Forecast)]),
'LD Forecast'[Period] = 'LD Actual'[Period]
),
BLANK()
)
)
)
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
danielpaduck
2 years agoHelper III
The DAX was complaining about the Period from the LD Actual table.