I want to calculate users for specific selected dates as per the selection made through datepicker (Qlik dashboard bundle). My source date field is in datetime format : YYYY/MM/DD hh:mm:ss e.g. "2018/12/23 15:56:00000"
My scenarios are mentioned below:
When user select a date , it should show [count(users) for selected date] - [count(users) for previous day of selected date] Example:
if user selects 20th December, should show [count(user) for 20th dec] - [count(user) for 19th dec]
If user selects 20th-30th dec, should show : [count(user) for 20-30 dec] - [count(user) for 9-19 dec]
Approach I already tried:
Converted datetime field in data editor: DATE(floor(datetime),'MM/DD/YYYY') AS [%KeyDate]
I tried the way you suggested to floor all dates. However, this is also not working.
I also tried converting all date to numbers and was successful in calculating previous time period dates from current selection. The count of user is showing in the app but count of users for previous time period is not coming correctly.
Please find the attached qvf file. Please help me out.