Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to provide date range in calender ?

hi

i want to provide date range in calender from ist jan 2015 to 31st dec 2016

15 Replies
Anonymous
Not applicable
Author

let Prev_Year=Only({$<Year={$(=Max(Year)-1)}>}Year)

let Curr_Year=Only({$<Year={$(=Max(Year))}>}Year)

is this correct?

then can i  use this variable in expression?

=num(
sum(if(Sold_Date <= MakeDate(Prev_Year,month(To),day(To)) and Sold_Date >=MakeDate(Prev_Year,month(From),day(From)),  [inv value]))/Sales_INR_Unit,
'#,##0.0')

please help?

Anil_Babu_Samineni

Yes You can

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

let Prev_Year=Only({$<Year={$(=Max(Year)-1)}>}Year)

let Curr_Year=Only({$<Year={$(=Max(Year))}>}Year)

and instead of year can i take sold_year (as feild name derived from createdate)????

Increment_Returns:
Concatenate(POS_Master_final)
LOAD
Warehouse as ETPCode,
SalesReturnNumber as [return no],
Date#(CreateDate, 'YYYYMMDD') as Sold_Date,
month(Date#(CreateDate, 'YYYYMMDD')) as Sold_Month,
year(Date#(CreateDate, 'YYYYMMDD')) as Sold_Year,
replace(ReturnItemNumber,' ','') as itemnumber,
left(ReturnItemNumber,3) as [Season Code],
ReturnQuantity as quantity_returns,
SalesPrice as [sales price],
-
LocalAmount as [inv value],
if ( LocalAmount <500, '<500', if ( LocalAmount <800, '500-799',if ( LocalAmount <1200, '800-1199',if ( LocalAmount <1600,'1200-1599',if ( LocalAmount <2500,'1600-2499',if ( LocalAmount <3500,'2500-3499',if ( LocalAmount <5000,'3500-4999','>=5000'))))))) as [Inv val Bucket];

Anil_Babu_Samineni

Does Year and Sold_Year created from Same Date Field? If so, Yes you can use it

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

yes

Anil_Babu_Samineni

Try to mark correct answer for proper reply rather yours. That may useful for others

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful