Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTM Calculation

Hello,

I want to calculate YTM target.

Eg. If user select April month then FTM and YTM will be same. but when he select May there should be addition of 2 months target i.e April & May


For The Month(FTM) Expresion


=Count({<NDATE={">$(vMaxUDate)","NULL"},JDATE={"<$(vMaxUDate)"}>}distinct ET)*NOAUDIT

YTM Expression


=if(MONTH='Apr',count({<JDATE={"<=$(vMonthEnd)"},CY={"$(vMaxYear)"},CN={1},NDATE={"NULL"}>} distinct ET)*NOAUDIT,

if(MONTH='May',(count({<JDATE={"<=$(vMonthEnd)"},CY={"$(vMaxYear)"},CN={1},NDATE={"NULL"}>} distinct ET)*NOAUDIT)

+

(count({<JDATE={"<=$(vMonthEnd)"},CY={"$(vMaxYear)"},CN={2},NDATE={"NULL"}>} distinct ET)*NOAUDIT))

where vMaxUDate=max(DATE) is Unlink date

CY is year, CN is Monthnum I am passing 1 in CN for April Month and 2 For May Month

Need help !!!

0 Replies