Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ch_riadh
Partner - Creator II
Partner - Creator II

Set Analysis ( Date )

i want to create this expression:

If  Status = {'A'} and Received_date_field > vSelectDate and Invoiced_date_field < vSelectDate , Count (StockID)

vSelectDate is a variable : Max(Received_date_field)

Please need help emergency

Thanks

15 Replies
ch_riadh
Partner - Creator II
Partner - Creator II
Author

sorry From 1988

ashfaq_haseeb
Champion III
Champion III

Hi,

Basically what I understand is you need data from starting till month end of selected year and month.

Correct me if I misunderstood something

Regards

ASHFAQ

ch_riadh
Partner - Creator II
Partner - Creator II
Author

yes

ch_riadh
Partner - Creator II
Partner - Creator II
Author

So give me the available stock.
if i select for example March 2012.
you have to give me all data till 31/03/2012
with this condition : Invoice_Date > Selected date.

ashfaq_haseeb
Champion III
Champion III

Hi,

You need to create one common date for that have a look at below post

http://community.qlik.com/blogs/qlikviewdesignblog/2014/02/17/canonical-date

Then try below

  vSelectDate=     monthend(Max(Received_date_field))

Count({$<Status = {'A'},[CommonDate]={"<=$(vSelectDate)"}>} [StockID])

Regards

ASHFAQ

ch_riadh
Partner - Creator II
Partner - Creator II
Author

LOAD

     Status,

     Stockid,

    Model,

    RECDATE,

    INVDATE

  

FROM

(qvd)  ;

My Customer want to show the Available Stock till the date selected.
with this Condition :

STATUS = "I"   and RECDATE <= Selected_Date     and       INVDATE > Selected_Date

For example :
if i select ( march/2014),

i need to see : the stock available stock from 1900 til 31/03/2014.

and if a car received on 20/03/2014 and invoiced  on 02/04/2014  ----->    i have to show it.

but if a car received on 20/03/2014 and invoiced  on 28/03/2014  ----->    i dont want to show it.

rec_date < vSelectedDate        and          inv_date <    vvSelectedDate