Forum Discussion
Reason for error: 'A column specified in the call to function 'PARALLELPERIOD' is not of type DATE'?
- 8 years ago
Hi Leeny127
Calculated column [Previous Yr. Error%] has the formula:
Previous Yr Error % = CALCULATE('Count_Paralender_Merge'[Error%],PARALLELPERIOD('Count_Paralender_Merge'[Created].[Month],-12,MONTH))
Pay attention to the bold character, this parameter should be in date type.
Please modify the formula with the following one
Previous Yr Error % = CALCULATE('Count_Paralender_Merge'[Error%],PARALLELPERIOD('Count_Paralender_Merge'[Created],-12,MONTH))
In DAX, PARALLELPERIOD always returns full periods at the given granularity level instead of the partial periods that DATEADD returns. So please check if the dates in date column are continuous. If the dates in the current context do not form a contiguous interval, the function returns an error.
Reference:
PARALLELPERIOD Function (DAX)Best Regards
Maggie
Hi Leeny127
Calculated column [Previous Yr. Error%] has the formula:
Previous Yr Error % = CALCULATE('Count_Paralender_Merge'[Error%],PARALLELPERIOD('Count_Paralender_Merge'[Created].[Month],-12,MONTH))
Pay attention to the bold character, this parameter should be in date type.
Please modify the formula with the following one
Previous Yr Error % = CALCULATE('Count_Paralender_Merge'[Error%],PARALLELPERIOD('Count_Paralender_Merge'[Created],-12,MONTH))
In DAX, PARALLELPERIOD always returns full periods at the given granularity level instead of the partial periods that DATEADD returns. So please check if the dates in date column are continuous. If the dates in the current context do not form a contiguous interval, the function returns an error.
Reference:
PARALLELPERIOD Function (DAX)
Best Regards
Maggie