Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to create a "Date" dimension that only uses the current year and the prior year. Right now, I have data from 4 years ago. "Date" is already a dimension on my report, but is there a formula I can use so that a separate "Date" dimension only pulls CY and PY?
Thank you
Hello,
In your script, you can do something like :
Calendar:
Load Distinct Year(Date) as Year
Resident YourTable
Where Year(Date)>=Year(today())-1;
Hi
Add this in your script
=if(year(Date)>year(addyears(today(),-2)) ,Date) as DATE_CY&PY
Hi @KPage,
try this:
Load *,
IF(Year = year(today()) OR Year = year(today())-1, Year, Null()) AS CY_PY
Inline [
Year
2024
2023
2022
2021
];
You can also use Set Analysis depends what your looking for.