Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am quite new to Qlik Sense. I have the following bar chart:
I am having the following expressions for dimensions/measures:
dimensions: =tstamp.autoCalendar.Date
measure uses the following expression: =1-((count({<part={'special'}, category {'good'}>} part))/(count(if(match(part, 'special'),part))))
It basically uses the two columns "part" and "category". It calculates then all the special parts which are good.
Now I would like to change the values of the bars so that the day starts and ends 1 hour earlier. e.g. bar 01.10.2019 should represent data from from 11pm (previous day, 30.09.2019) to 01.10.2019, 11pm.
Does anyone know how this can be realised?
Edit: another questions would be if it is possible to display only the last 7 days?
Thank you!
It should be possible but you would need to create a different date column in your script. something like below
e.g. check if time is after 11 pm if so put it as next day
if(hour(timestamp-column-from-data)=23, date(floor(timestamp-column-from-data),'MM-DD-YYYY')+1, date(floor(timestamp-column-from-data),'MM-DD-YYYY')) as NewDateColumn
also i would recommend using script to create a master calendar table, rather than using the auto calendar (gives more flxibility)
e.g.
https://qlikviewcookbook.com/2015/05/better-calendar-scripts/
and in the master calendar add a new Date Field which indicates the condition that you mentioned