Forum Discussion
Creating A Prior Year Amount Column
- 6 years ago
Hi Anonymous ,
I‘m not sure whether your measure [Total Est Rev PY] checked right?I'm guessing whether you're using a calendar date to calculate the value?If so, you need to choose a table date instead of a calendar date,then you will see as below:
As for the measure
Total Est. Rev PY = CALCULATE([Total Est Rev],Filter('Quotes Estimates US'[Estimate Revenue],PREVIOUSYEAR('Calendar'[Year])=YEAR('Quotes Estimates US'[JobSDate]-1)&& 'Calendar'[Month]='Quotes Estimates US'[Job Start Month]))Should be corrected as below:
Total Est. Rev PY = CALCULATE([Total Est Rev],Filter('Quotes Estimates US'[Estimate Revenue],PREVIOUSYEAR('Calendar'[Year])=YEAR('Quotes Estimates US'[JobSDate])-1)&& 'Calendar'[Month]='Quotes Estimates US'[Job Start Month]))You missed a ")" after the function "Year“,if there still has errors,check what I have said above, I guess the problem happens in the "date" you are choosing.
Best Regards,
Kelly
Total Est. Rev PY =
CALCULATE(
[Total Est Rev],
Filter(<table expression> missing,
PREVIOUSYEAR('Calendar'[Year])=YEAR('Quotes Estimates US'[JobSDate]-1)&&'Quotes Estimates US'[Job Start Month]='Quotes Estimates US'[Job Start Month]
)
)
you seem to have just one expression in your filter function, although it is a complex expression and uses && to combine 2 columns you want to filter
and you are missing the <table> argument to filter
Ok so now it is saying that hte filter function exepcts a table expression for arguement '1', but a string or numeric expression was used.
- v-kelly-msft6 years agoCommunity Support
Hi Anonymous ,
I‘m not sure whether your measure [Total Est Rev PY] checked right?I'm guessing whether you're using a calendar date to calculate the value?If so, you need to choose a table date instead of a calendar date,then you will see as below:
As for the measure
Total Est. Rev PY = CALCULATE([Total Est Rev],Filter('Quotes Estimates US'[Estimate Revenue],PREVIOUSYEAR('Calendar'[Year])=YEAR('Quotes Estimates US'[JobSDate]-1)&& 'Calendar'[Month]='Quotes Estimates US'[Job Start Month]))Should be corrected as below:
Total Est. Rev PY = CALCULATE([Total Est Rev],Filter('Quotes Estimates US'[Estimate Revenue],PREVIOUSYEAR('Calendar'[Year])=YEAR('Quotes Estimates US'[JobSDate])-1)&& 'Calendar'[Month]='Quotes Estimates US'[Job Start Month]))You missed a ")" after the function "Year“,if there still has errors,check what I have said above, I guess the problem happens in the "date" you are choosing.
Best Regards,
Kelly