Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

Variable is not working properly

Hi All,

I have two Variable varMinDate and varMaxDate.

These two are not showing proper date right after reloading (default view).

But if we select any date then it is showing correct date.

Can anyone please help me on this.

Thanks,

Sarif

5 Replies
MK9885
Master II
Master II

maybe user Date(your field) then save the variable?

or Date(YOURDATEFIELD,'MM/DD/YYYY') store into variable

mhmmd_srf
Creator II
Creator II
Author

I need to capture this through variable not Date field.

MK9885
Master II
Master II

Yes but to store a variable you'll write an expression in variable right?

What is the expression in your variable?

mhmmd_srf
Creator II
Creator II
Author

This is my expression for creating variable:

Temp:

Load

Date(min(ShipDate1)) as minDate,

Date(max(ShipDate1)) as maxDate

Resident FACT_PROOFOFDELIVERY;

Let varMinDate = Date(Peek('minDate', 0, 'Temp'));

Let varMaxDate = Date(Peek('maxDate', 0, 'Temp'));

MK9885
Master II
Master II

Your varMinDate and MaxDate are stored in numbers like 4524

To test that take a text box and type in your variable

=$(varMinDate ) ans you'll see the dates come as just numeric format

Below I have same variable...

On left it is just

=$(varMinDate ) and on right it is Date($(varMinDate ))

2018-09-28_095855.png