Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
capriconuser
Creator
Creator

season sales

I have a invoice date and from that date i extract seasons in script like this 

this is season tab

Seasons:
LOAD [Invoice Date], 
     Month([Invoice Date]) as Invoice_Month,
     if(Month([Invoice Date])=1  or Month([Invoice Date])=2 or Month([Invoice Date])=3 or Month([Invoice Date])=4 or Month([Invoice Date])=5, 'Spring',
  if(Month([Invoice Date])=6  or Month([Invoice Date])=7 or Month([Invoice Date])=8 or Month([Invoice Date])=9 , 'Summer',
if(Month([Invoice Date])=9  or Month([Invoice Date])=10  , 'Autumn',
if(Month([Invoice Date])=11  or Month([Invoice Date])=12  , 'Winter'
)))) as Season
FROM
[C:\Users\HP\Downloads\salesdata.xlsx]
(ooxml, embedded labels, table is salesdata);

 

this is data tab where i load all other fields 

LOAD date([Actual Delivery Date]) as Actual_Delivery_Date, 
     [Invoice Date], 
     Month([Invoice Date]) as Invoice_Month, 
     [Item Number], 
     [Line Desc 1],  
     [Sales Amount]
FROM
[C:\Users\HP\Downloads\salesdata.xlsx]
(ooxml, embedded labels, table is salesdata);

now from this data i am trying to get these 2 points ..

1) products which have poor sales during winter season 

2)  5 products should be included in the summer campaign

i am trying to do this for 1st point .. if sales amount is less than 300 in winter season then display on those products.. 

 

if(sum([Sales Amount])<=300,Season={"Winter"})

 

and for 2nd point if  there is some product list

1/1/2019   apples

12/12/2019  mango 

like as above mango fruit should be in summer .. so i am trying to display products which should be in summer season.

however this shows an error. how i correct this ? hope i explain my problem clearly ..

 

for more data i attached data sheet

 

0 Replies