Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am very new to Qlikview. I have 2 segments comparisons in 1 chart, eg, compare different time period.
"Segment1" & "Segment2" are in same design, can allow the user to click and select the fields in several list box.
Let say "Segment1" contain the fields "Product", "Store" and "Date".
but now i want to remove the "Date" selection and create input box for users to input "vStartDate1" and "vEndDate1" for "Segment1"
So how is the expression of sum the "Sales" for "Segment1" with "vStartDate1" and "vEndDate1"?
Hi Ivan
May be try:
= Sum({< Date = {">=$(=Date(vStartDate,'DD/MM/YYYY'))<=$(=Date(vEndDate,'DD/MM/YYYY'))"} >} Sales)
Regards
Neetha
Hi Neetha,
Thanks. But may be I make the question more clearly.
I have 2 segments to compare in a chart with 2 lines: "Segment1" & "Segment2"
What is the expression fro Line1 : Sum of sales ("Segment1", with "vStartDate1" and "vEndDate1)
and What is the expression fro Line2 : Sum of sales ("Segment2", with "vStartDate2" and "vEndDate2)
"Segment1" and "Segment2" contain the fields "Product", "Store" etc...
Thanks,
Ivan Chung
Hi Ivan,
what are the fields we need to compare these variables with(vStartDate1 ,vEndDate1, vStartDate2 and vEndDate2) in set analysis?
Regards
Neetha
Well, those fields are "Store", "Product". Let say I can compare ProductA, Store01, from 3-May-2015 to 7-Jun-2015 and ProductC, Store13, from 22-Apr-2015 to 10-May-2015. Thanks
Hi
What do you mean by segments? alternate states?
Please clarify
Sasi
Hi Sasi,
Yes. 2 alternate states.
Thanks.
Ivan Chung
so is it ?
= Sum({< Date = {">=$(=Date(vStartDate1,'DD/MM/YYYY'))<=$(=Date(vEndDate1,'DD/MM/YYYY'))"} ,{[Segment1]}>} Sales)
&
= Sum({< Date = {">=$(=Date(vStartDate2,'DD/MM/YYYY'))<=$(=Date(vEndDate2,'DD/MM/YYYY'))"} ,{[Segment2]}>} Sales)
but seem wrong...
Anyone can help?