Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikview community,
I added to variables vStartDate and vEndDate to a dimension transaction_date as follow.
vStartDate = Min(Transaction_date)
vEndDate = Max(Transaction_date)
and a trigger for vStartDate:
dimension Field :Transaction_date
='>=' &vStartDate & '<=' &vEndDate
trigger for vEndDate:
dimension Field :Transaction_date
='>=' &vStartDate & '<=' &vEndDate.
I want to get 0 values for all data fields if the user selects vStartDate > vEndDate.
How to implement that in Qlikview?
Thank you in advance,
Best regards,
Abdallah
Hi Anil,
It's working!
Thank you very much.
if ('$(vStartDate)' <= '$(vEndDate)',sum (S_QTEPROD),0)
best regards,
Abdallah
Hi Peter,
Thank you it's working.
Just I didn't find where to set the initial value.
Best regards,
Abdallah
The easiest way to do this is in your script. An initial value is only a placeholder, and usually needs to be assigned only once. For example:
MinMaxTable:
LOAD Min(transaction_date) AS MinDate, Max(transaction_date) AS MaxDate
RESIDENT SomeSourceTransactionTable;
LET vStartDate = Date(Peek('MinDate'));
LET vEndDate = Date(Peek('MaxDate'));
DROP Table MinMaxTable;