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

YTD Sales/Set Analysis

Hi,

This is what giving me a hard time. This is YTD sales.

When the user selects only Q1, then it should display the YTD sales of the current year(2014).

When the user select Q2, then it should display the YTD sales for 2013 from Jan-Jun because this year we are still in Q1.

Similarly when we select only a month, e.g. Mar, then it should display the YTD sales for 2014 Jan-Mar.

But when you select only Aug, it should display the YTD for 2013 Jan-Aug.

When the user selects year 2013 and Feb then it should display the YTD Sales for 2013 Jan-Feb.

Thank you.

1 Reply
datanibbler
Champion
Champion

Hi Piyush,

that is a bit complex. Not quite intuitive in my eyes, but ok.

- What I usually do is, I create (in a multibox)

     - one field "Year"

     - one field >> aggr(Quarter, Quarter) <<

=> That way, when Year=2014, only Q1 will show up at all.

<=> With your requirement, that is not applicable of course.

=> You will need a trigger that reacts to the selection on fields "Quarter" or "Month" and compares it to > Today() <

     and automatically selects the corresp. year
    (that would be in the document_properties)

HTH

Best regards,

DataNibbler