In the Power BI Desktop Query Editor I created an Unpivoted table based on certain attributes (columns to rows) which gives me correct values in a separate column.
What I would like to do is create another column called "LastYear" which takes the row's Datetime and looks up the Value of the same date last year.
The PARALLELPERIOD expression doesn't seem to be giving the right results and I cannot get it to work in a Custom Column.
Here's what I tried for a calculated column in Power BI Desktop:
LastYear = CALCULATE(SUM('Table1'[Value]); PARALLELPERIOD('Table1'[Datetime]; -1; year))
Putting this formula in a Custom Column in Query Editor it first tells me there are no syntax errors found, but once I try to insert the column then it keeps saying "Expressions.Error: The name 'CALCULATE' wasn't recognized. Make sure it's spelled correctly.'
What am I doing wrong?