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

set Analysis

Hi to all,

I have the data from 01 Dec 2008 to 03/02/2015...


if we select any date between these dates,,i want get the data from 01/12/2008 to selected date.

i have two fields like Product and opening Quantity.

for opening Quantity i have to find out that in pivot table.

please give me expression for that.


suppose i selected 01 feb 2015, then i will get the data from starting date to selected date means 01 Dec 2008 to 01 feb 2015.


pls help me



Thannks in advance.

chandra.

12 Replies
MayilVahanan


Hi

Try like this

= Count({<Date = {"<= Date(Max(Date),'DD/MM/YYYY')"}>} Quantity)

Note:

Please change the date format as per ur date format.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

hii mahil,

i want get the data from starting date to selected date

might be not count,,surely it ll be sum

thanks for ur reply

PrashantSangle

Hi,

Try like

= Sum({<Date = {"<=$(=Date(Max(Date),'DD/MM/YYYY'))"}>} Quantity)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi max,

Thanks for ur reply,

I have an one doubt,

is there any need of start date???? if yes how???

i stored my max date into as vEndDate Varible..

how can i use it pls give me proper expression.

PrashantSangle

Hi,

Since you need data from begining to current selection then you dont required the start date in above expression.

It will give you all data less than or equal to current selection date.

Now if you want to used variable then create variable with expression

=Date(max(Date),'DD/MM/YYYY')

Then replace that varible with expression used in set analysis.

Try like

=Sum({<Date={"<=$(vEndDate)"}>}Quantity)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi Chandra,

Define the valuable

vEndDate  =Date(Max(Date),'DD-MM-YYYY')

Please try this exp:

Sum({<Date = {"<=$(vEndDate)"}>} Quantity)

avinashelite

Hi

Try like this:

1.define a variable to the current selected date

2.Then use if condition to get the required data field

if(Date <= Date(Max(Date),'DD/MM/YYYY'),required_feild}

Not applicable
Author

Hi

Thank u so much to all for giving reply..

Generally i have an one doubt to max and sovan,,,

U given expressions right??? in that expression what can i put replacing by ''date'' after sum({....

in my script i ve an one field that is Posting date...

thanks

avinashelite

if you have got the answer mark this tread as answered and close it