Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
i need to add a Time Range functionality so that in the dashboard there should be a field which will provide the options
Time range options : current day, last day, current week, last week, current month, last month, enter date range
when the user click on current day the data should be displayed for current day and so on.. but if the user clicks on enter date range then there should be something to enter the date range manualy suppose i enterd 1-aug-2011 and 3-aug-2011 then the data should be displayed for 3 days that is 1-aug to 3-aug..
I wonder about this functionality in qlikview.. Please help me out to solve this problem..
Thanks
Please add your experience to solve it..
Dear Friend,
You can add two calender one Is From Date and another is To Date.
Then define 2 variable for the both.U can Define 1.vFDate and 2.vTDate
Then put the variable in the expression u want to calculate.
An Example is --
Sum({<Num_Sale_Date={">=$(vFDate)<=$(vTDate)"}>} Quantity)
I think it will work for you.
Thank & Regards,
Koushik.
Hi Sushil,
Check this app in regards to use a master calendar linked to your fact table, variables and set analysis. If you want some of those ranges fixed (say last month, last 30 days or so), I'd create additional fields in the master calendar table, so you will always have this value and it will be changed dynamically, without need of changing the code every day.
Hope that helps.
BI Consultant
I would suggest creating a field in your calendar table to hold the "Time Range Options"
Then concatenating duplicate entries in your calendar that correspond to the various time range options you want to use, Like this...
Time Range | Date |
---|---|
Current Day | 8/24/2011 |
Current Week | 8/24/2011 |
Current Week | 8/23/2011 |
Current Week | 8/22/2011 |
Current Week | 8/21/2011 |
Current Month | 8/24/2011 |
Current Month | 8/23/2011 |
Current Month | 8/22/2011 |
Current Month | 8/21/2011 |
Current Month | 8/20/2011 |
Current Month | ... |
Range Selection | All possible dates... |
Then once you have all your Ranges defined you could put your Time Range Field in a list box with the setting to "require selection"
Then use the "Show" condition property on a list box or slider to hide it when the selected value for "Time range" is equal to "Range Selection"
Finally use a Field event trigger on Time Range to clear selections on your date field when the user selects Timer Range values other than "Range Selection"
I wish I had a working example to show but I've not actally done this one but it sounds reasonable, the biggest trouble spot is going to be managing the selections on the Date field so that it is cleared when it needs to be. You'll have to experiment a bit to make it all work.
Good luck
Chris