Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello - I have created a calculated column to show Error % from the previous year, so that I can compare to the current year in a visual. I am using a PARALLELPERIOD formula but keep getting the following error:
A column specified in the call to function 'PARALLELPERIOD' is not of type DATE. This is not supported.
This confuses me because the column specified is a Date type column (see screenshots below). Any guidance on why this is happening would be appreciated.
Calculated column [Previous Yr. Error%] has the formula:
Previous Yr Error % = CALCULATE('Count_Paralender_Merge'[Error%],PARALLELPERIOD('Count_Paralender_Merge'[Created].[Month],-12,MONTH))
Current year error % is calculated with the measure [Error%]:
Error% =
DIVIDE(
SUM('Count_Paralender_Merge'[# of Errors]),
SUM('Count_Paralender_Merge'[# of Fields Possible]))
Solved! Go to Solution.
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
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |