Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change YTD Into MTD,QTD,WTD

Hi experts,

I have YTD Expression as below

YTD Exprssion:

(sum(if(IsNum((If (Day_Dt <= $(CurrentDate) and Day_Dt >= $(StartingDate), Ext_Net_Sales, null()))),(If (Day_Dt <= $(CurrentDate) and Day_Dt >= $(StartingDate), Ext_Net_Sales, null())),0))

Previous Year YTD:

sum(if(IsNum((If (Day_Dt <= $(CurrentDateLY) and Day_Dt >= $(StartingDateLY), Ext_Net_Sales, null()))),(If (Day_Dt <= $(CurrentDateLY) and Day_Dt >= $(StartingDateLY), Ext_Net_Sales, null())),0))

-1)

and the variable are defined as follows:

CurrentDate = today()

CurrentDateLY=IF(vCalendarName = 'Fiscal' and FiscalYTD = 1, CurrentDateLY_Fiscal, CurrentDateLY_Calendar),

StartingDate=IF(vCalendarName = 'Fiscal', StartingDate_Fiscal, StartingDate_Calendar),

StartingDateLY =IF(vCalendarName = 'Fiscal', StartingDateLY_Fiscal, StartingDateLY_Calendar)

Can change That expression into MTD,QTD,WTD

Please help me

Thanks

Siva

0 Replies