Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using a slider object to determine how many computers are remaining to be upgraded at a particlar date and time. A particular Date and Time is selected by the Slider and its input comes from from "Slider Date" column from the Table. When a user selects a date from the slider, the output must display, "the number of Computers" where the "Upgrade Date" is 'After" the "Selected" Slider Date. In the appended table, if we select row 5 as Slider input, Slider Date "01/31/2014 10:45 AM", then the output is 3. Three computers were waiting for upgrade - Computer3, Computer4, and Compurt5, because their upgrade date is "After" the selected Slider Date. Computer1 already started upgrade process at 10:10 am and Compter2 started 10:20 and, so they are excluded from the count. We also do not want to count computers beyond the selected "Slider Date", whcih in this case is row 6 through row 10.
I use Slider object with "Slider Date" as Data Field input, with Mode "Single Value".
I want to use "Table" object to display Numbers. I used no dimension. I used "GetObjectField" function to get the date field, but it does not provide any output. Can comeone help me understand how to get the "Value" from the slider and use it as input to "Table"? I appreciate. Thanks,
Items | Slider Date | Upgrade Date | |
1 | Computer1 | 1/31/2014 10:08 AM | 1/31/2014 10:10 AM |
2 | Computer2 | 1/31/2014 10:16 AM | 1/31/2014 10:20 AM |
3 | Computer3 | 1/31/2014 10:20 AM | 1/31/2014 11:25 AM |
4 | Computer4 | 1/31/2014 10:30 AM | 1/31/2014 12:23 AM |
5 | Computer5 | 1/31/2014 10:45 AM | 1/31/2014 1:19 PM |
6 | Computer6 | 1/31/2014 10:56 AM | 1/31/2014 1:41 PM |
7 | Computer7 | 1/31/2014 12:01 PM | 1/31/2014 1:32 PM |
8 | Computer8 | 1/31/2014 12:21 PM | 1/31/2014 2:03 PM |
9 | Computer9 | 1/31/2014 12:12 PM | 1/31/2014 2:38 PM |
10 | Computer10 | 1/31/2014 12:42 PM | 1/31/2014 2:29 PM |
Message was edited by: Raghavendra Rao I poseted QVW file
Something like
Count ( {<[Upgrade Date] = {">[Slider Date] "}>} Items )
Richard
qlikcentral.com
I appreciate you fast response. I want to use the Expression above in the "Table" object. But how do I get the value from the "Slider" object and then insert that value into my Expression within the Table object? In the Table object, I want to display the count as number. I am having diffifculty getting the "field value" from slider. I used "GetObjectFiled" function and "GetFieldSelection".
Hi,
It would be something similar like
Count (1 {<[Upgrade Date] = {">$(=GetFieldSelections([Slider Date])"}>} Items )
Try adding the '1' above also, looking at your dataset selecting the Slider Date will reduce you data by association and this will ensure you're querying the full dataset.
If you're still having issues post an example app and I'll have a look for you
Regards
Richard
qlikcentral.com
Hi Richard,
I applied the expressions and it did not seem to work. I uplaoded the qvw file. If you have or anyone else can suggest what functions is appropriate, that will be helpful.
Thanks,
Raghu
The qvw isn't showing (sometimes there's a delay), once its up I'll have a look for you.
Richard
In the script .....
MainDates:
LOAD F1,
Items,
[Slider Date],
[Upgrade Date]
FROM slidertest.xlsx (ooxml, embedded labels, table is Sheet1);
SliderLoad:
LOAD
[Slider Date] as SliderOnScreen
Resident
MainDates;
I created the slider with the field SliderOnScreen.
I created a chart with an expression very similar to the one above:
count ({1<[Slider Date] = { " <$(= date(GetFieldSelections([SliderOnScreen])))"}>} [Slider Date] )
I hope that this helps
I appreciate you fast response. I implemented above script exactly. It did not work. I believe in the "Count" expression, the [Slider Date] is actually [Upgrade Date]. I replaced that slider date with upgrade date, but it did not display the count in the Chart.
With the load script that Robert suggested, you could use the expression:
=Sum(Aggr(If(SliderOnScreen >= [Upgrade Date], 1, 0), [Upgrade Date]))
I think that the only reason that this would not work would be that you have not converted your date fields correctly and the field being loaded is not a date.
Can I suggest that you use a simple test file from Excel to check the functionality first and then check to see ifyour date is correct. The area of date conversion in QlikView can be very frustrating and is probebly the reason for the application not working.
I hope that this helps