Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
scaruthers
Contributor
Contributor

YTD / Prior YTD

Hello,

I'm trying to create a set analysis that will be used in the Nprinting Formulas area. Most set analysis's work between Qlik Sense and Nprint.

I am using SUM(IF([Service Year] = YEAR(Today()), [Case Count])) to return the Case Count for the Current YTD.

However, I cannot figure out how to get the Prior YTD.  I tried the YEAR(Today())-1 in the above, but it returns the entire year. I need it to cut off at the current day (rolling forward).

Anyone have a suggestion?

Thanks

2 Replies
jwjackso
Specialist III
Specialist III

Assuming you have a transaction date,

[Service Year] = YEAR(Today()) - 1 and [Transaction Date] <= AddMonths(Today(),-12)

OmarBenSalem

Hi Stevens,

Please try to refer to this thread in which I tried to explain step by step this type of time expression

Ytd, Ytd-1

Mtd, Mtd-1 etc

YTD, MTD issue