Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Can any one give me Idea to find the Vaue for Today,YTD and MTD in the Qlikview Script.
Thanks In Advance !!
Regards
Deepak
Today: if(Date = Today(), True, False) as TodayDate
YTD: if(Date <= Today() and Year(Date) = Year(Today()), True, False) as YTD
MTD: if(Date <= Today() and Year(Date) = Year(Today()) and Month(Date) = Month(Today()),True, False) as MTD
Where Date is the date in your script.
You can try:
YTD:
=num(sum({$<Year = {$(=only(Year))}, Month = {"<=$(=max(Month))"}>} LineSalesAmount), '$#,##0;($#,##0)')
QTD:
=num(sum({$<Year = {$(=only(Year))}, Quarter = {$(=only(Quarter))}, Month = {"<=$(=max(Month))"}>} LineSalesAmount), '$#,##0;($#,##0)')
MTD:
=num(sum({$} LineSalesAmount), '$#,##0;($#,##0)')
GL
What do you want to achieve with these values?
Hi Shiva,
I want in this Qlikview Script.
Hi Frank,
This is the requirement .
Hi Josh,
Thanks for reply. Yes Date is the Transaction Date in this Script
Look at Help for functions:
InYearToDate()
InMonthToDate()
-Rob
Do you want to calculate these values in your load script? You want to have a fixed YTD value in a table?