Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

ch_riadh
Contributor

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

Re: Set Analysis ( Date )

Hi,

Try this expression

=count({<Status = {'A'}, Received_date_field={'>$(=Max(Received_date_field))'}, Invoiced_date_field={'<$(=Max(Received_date_field))'}>}StockID)

Re: Set Analysis ( Date )

Hi,

Try like this

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

Make sure you have proper date format.

Regards

ASHFAQ

ch_riadh
Contributor

Re: Set Analysis ( Date )

Thanks but, i want , if i select the month exp: March 2013 without selecting the date  it give me 31/03/2014.and i need all data from 2008 till the date who i selected.

Re: Set Analysis ( Date )

Hi,

Option 1: = monthend(max(Date) )

Option 2: = monthend(makedate(Year, Month) )

Regards

ASHFAQ

ch_riadh
Contributor

Re: Set Analysis ( Date )

This is my expression: i need all data from 2008 till the date who i selected.Can you give me the full expression please.thanks


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




Variables: vStartDate   :       31/12/1988

                 vSelectDate:      Max(Received_date_field)

                 vMonthEnd:       MonthEnd(Received_date_field)

                

Re: Set Analysis ( Date )

Hi,

Can you post sample app with expected o/p

Regards

ASHFAQ

ch_riadh
Contributor

Re: Set Analysis ( Date )

This is my expression: i need all data from 2008 till the date who i selected.Can you give me the full expression please.thanks


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




Variables: vStartDate   :       31/12/1988

                 vSelectDate:      Max(Received_date_field)

                 vMonthEnd:       MonthEnd(Received_date_field)

Re: Set Analysis ( Date )

Hi,

Why 2008 is your data start from 2008 or what?

Regards

ASHFAQ

ch_riadh
Contributor

Re: Set Analysis ( Date )

yes
i wanna get the all  data  till selected date

Community Browser