Discussion Board for collaboration on QlikView Scripting.
In QlikView I wanted to design a table which displays a column if Year selected-1 is less then or equals to minimum Year available in my data set.
In my code I have the following:
date(min(OrderDate)) as MinimumDate,
date(max(OrderDate)) as MaximumDate
LET $vMinDate = Date(MinimumDate,'DD-MM-YYYY');
In the Condition for the column expression:
(only(Year)-1) >= Year(date(MinimumDate))
correctly does not display this Column when I select the minimum Year in my data set.
(only(Year)-1) >= Year(date(vMinDate))
(only(Year)-1) >= Year(date($vMinDate)),
and even (only(Year)-1) >= Year(date#(vMinDate,'DD-MM-YYYY'))
are always evaluated to True which is incorrect.
I would ideally like to drop table dateRange and utilise $vMinDate correctly in the Table Condition.
How can this be accomplished?
Your variable-creation is wrong. Try it in this way:
LET vMinDate = peek('MinimumDate', 0, 'DateRange');
(only(Year)-1) >= Year($(vMinDate))
View solution in original post