Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am a beginner in QlikSense and I am trying to put an expression for sum mile. I get an error with the following formula :
=Sum(if(Match([type],'1','5','8','200') and [log_mileages.created_at.autoCalendar1.Date] = {">=$(=Date($(vFromDate)))<=$(=Date($(vToDate)))"}, [log_mileages.mile]))
I guess the error is in this part : and [log_mileages.created_at.autoCalendar1.Date] = {">=$(=Date($(vFromDate)))<=$(=Date($(vToDate)))"}
Can someone please help ?
Thanks !
Looks like someone mixed in some set analysis syntax that doesn't belong...
and [log_mileages.created_at.autoCalendar1.Date] >=$(=Date($(vFromDate)))
and [log_mileages.created_at.autoCalendar1.Date] <=$(=Date($(vToDate)))
Or you could move this part as a set analysis rather than putting it in the if() - note that the parenthesis might be mislocated here since I just cut-pasted the sections around:
Sum( {< [log_mileages.created_at.autoCalendar1.Date] = {">=$(=Date($(vFromDate)))<=$(=Date($(vToDate)))"} >} if(Match([type],'1','5','8','200'),[log_mileages.mile]))
Looks like someone mixed in some set analysis syntax that doesn't belong...
and [log_mileages.created_at.autoCalendar1.Date] >=$(=Date($(vFromDate)))
and [log_mileages.created_at.autoCalendar1.Date] <=$(=Date($(vToDate)))
Or you could move this part as a set analysis rather than putting it in the if() - note that the parenthesis might be mislocated here since I just cut-pasted the sections around:
Sum( {< [log_mileages.created_at.autoCalendar1.Date] = {">=$(=Date($(vFromDate)))<=$(=Date($(vToDate)))"} >} if(Match([type],'1','5','8','200'),[log_mileages.mile]))
Thanks a lot, this helps ! Unfortunately I still have an issue... how i can check $(vFromDate) and $(vToDate) because they can be null (i get value from filter panel)