Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
snehamahaveer
Creator
Creator

3 month count for the products demo'd

Hi All, I am trying to create a 3 month count for the various products that have been demo'd. Eg. If month selected is 'Aug', then the count would be for the months - Jun, Jul, Aug. I do not want it to be a distinct count. Could anybody please help me with it. Its really urgent. Must finish the report by Friday!# I tried using the Rangecount() with Aggr() but it provides distinct values. I tried set analysis using a variable but again I am unable to get the desired value. Your help is much appreciated.

5 Replies
sinanozdemir
Specialist III
Specialist III

Hi Sneha,

Is this something similar to what you are looking for?

Capture.PNG

If I choose a date from the date list box, the table only will show the number of companies within 3 months of selected date:

Capture.PNG

The expression I used:

Capture.PNG

Hope this helps.

snehamahaveer
Creator
Creator
Author

Hi Sinan, In theory Yes, I am looking for something similar. My month field displays values as 'Aug, Apr' so can I use getfieldselected() here to do identify the past 3 months?? I want to be able to select a month and then create a chart with values for 3 months. 

Capture1.JPG

Thanks for your help

sinanozdemir
Specialist III
Specialist III

Hi Sneha,

You may need to add the below script to load script:

Capture.PNG

And then in your expression, you can write something like the below:

Capture.PNG

I am attaching the sample qvw in case you need it.

Hope this helps.

snehamahaveer
Creator
Creator
Author

Hi Sinan, Your formula does work, but the problem I have is that it still gives a months data and not for 3 months. I am so not understanding where I am going wrong. Count(products) gives the same value as your formula. What can I do next?

sinanozdemir
Specialist III
Specialist III

Would you mind sending some sample data?

I cannot open an app so that's why I said just some sample data.

Thanks