Discussion Board for collaboration related to QlikView App Development.
I got two requirements to do
1) To show dates in desc order (Which is done using below code)
date($(varMaxDate) - Iterno()+1,'DD-MM-YY'),
if( date($(varMaxDate) - IterNo() + 1) =Date($(varMaxDate)),1,Peek("MainDate")+1))as "MainDate"
2) I need to display Max Date and Min Date,hence in KPI I have written below expressions
expression : Max(MainDate),Min(MainDate)
Instead of getting Max Date and Min Date , I am getting numbers as shown above, this is because of Daul function ,hence how I convert those numbers into date in UI
Your approach for date creation seems to be wrong. Date is dual field by default, i.e. - if you have a proper date, you don't need to create a dual value for this field explicitly. If you are doing so, that means your number values at the back of the date values are not real date values but some custom values that are just being used for sorting. With this approach you are complicating things unnecessarily. I
Yes you are right its seems same to me that I am complicating the things but the thing is I need dates to be shown in descending order in the front end ,hence I am assigning the values to dates using daul function
I see your point. In visualization you can set your sort order, but for selection panel field sort order - it seems to be always 'ascending'. There should have been a setting for this sort order; and this is really imperative for date fields.
As a workaround, you can try putting negative weight to the date field and then use another negation for any calculation on top of it.
Dual(-MainDate, MainDate) as MainDate