Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
scaruthers
New 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

Tags (3)
2 Replies
jwjackso
Valued Contributor

Re: YTD / Prior YTD

Assuming you have a transaction date,

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

OmarBenSalem
Esteemed Contributor

Re: YTD / Prior YTD

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