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: 
Not applicable

next 90 days logic in Bar chart

Hi guys,

I have a bar chart where dimensions : (snapshotdate,salesstage) , expression : sum(amount)

image is attached below....

now i want my bar chart to show the next 90 days amount for every snapshotdate....

i am trying to use following logic but not getting proper results....

if(floor(closingdate)>=floor(today()) and  num(floor(closingdate))-num(floor(today()))<=90,closingdate)


how to integrate above logic in bar chart expression to get amount....

4 Replies
er_mohit
Master II
Master II

in load script do this way

load  *,

if(closingdaydiff >=0 and closingdaydiff<=90,dual('0-90',1),dual('>90',2) as bucket ;

load closingdate,

today()- num(closingdate) as closingdaydiff,

otherfields from datasource ;

making bucket in script and in expression write

sum(if(bucket = '>90',amount))

Not applicable
Author

Hi mohit,

It is throwing error of datedaydiff  field is not found....

thanks ,

sachin

er_mohit
Master II
Master II

send me your file

Not applicable
Author

HI mohit,

I dint find a option to attach file so i have again posted the question with attached qvd file.

thanks,

Sachin