Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

problem with filter dates

when I choose CAREA 2015 = 0

1.png

But when I choose year =2016 , when I choose CAREA 2015 =<>0

2.png

Date format stored in Qlikview

Sans titre.png

Expression :=if(IsNull(GetFieldSelections(Week,'*')),Sum({$<Year={$(=max(Year-1))}>}[Prix de vente TTC]),Sum({$<Weekyear= {$(=max(Weekyear-1))}>}[Prix de vente TTC]))

How to get values for last year when I choose from .. to date ?

1 Reply
ali_hijazi
Partner - Master II
Partner - Master II

your date field actually contains time that's why you get decimal numbers as values

Qlikview deals with Dates as numbers

and you use the Date function on the charts to display date values as readable dates (formatted as DD/MM/YYYY etc...)

if you want to remove the time part then in the script you need to use the num(DayStart(your_date_field)) as field_name

now in the sliders you need to link each to a varialble vFromDate and vToDate

in the number tab select Date to display readable dates

then go to settings->Document Properties->triggers

and use the OnSelect triggers of the variables to assign actions

the actions would be select in Field and the value would be:

'your_date_field >=' & $(vFromDate) & 'your_date_field <=' & $(vToDate)

hope that helps or you can send me a sample document and I would give you the solution on the sample document

I can walk on water when it freezes