Forum Discussion
Anonymous
3 years agoNot applicable
Cost Allocation over time.
Dearest Fellow PBI users, I have a dataset of 23k leases. Each lease has its own start date, end date, category, and monthly amount. The start dates begin 1/1/2018 and end dates up to 12/31/30. I ne...
Anonymous
3 years agoNot applicable
I was able to replicate everything with one exception. I'm getting an error "end of expression was reached" I'm not able to see my error. Please take a look.
CostAllocation =
VAR _CurrentYear = MAX('Calendar'[Year])
VAR _CurrentQuarter = MAX('Calendar'[QuarterNum])
VAR _CurrentMonth = MAX('Calendar'[Month])
RETURN
CALCULATE(
[TotalLeaseCost],
FILTER(
'Lease',
YEAR('Lease'[IN_SERVICE_DATE]) <= _CurrentYear && YEAR('Lease'[FINAL_EOT_DATE]) >= _CurrentYear &&
QUARTER('Lease'[IN_SERVICE_DATE]) <= _CurrentQuarter && QUARTER('Lease'[FINAL_EOT_DATE]) >= _CurrentQuarter &&
MONTH('Lease'[IN_SERVICE_DATE]) <= _CurrentMonth && MONTH('Lease'[FINAL_EOT_DATE]]) >= _CurrentMonth
)
)
Anonymous
3 years agoNot applicable
there was a double "]" on the final line, issue resolved!