Forum Discussion
Cost Allocation over time.
Hi Anonymous ,
Please check the pbix file:
If I have misunderstood your needs, please feel free to contact us.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
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
)
)
- Anonymous3 years agoNot applicable
there was a double "]" on the final line, issue resolved!