Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello QlikView expert..
i want to sum all sales from beginning of date to current date
for example :
1. if i select year 2013, then the sales will sum from beginning of year (2010 for example) until the last sales in 2013
2. if i don't select anything, then the sales will sum from beginning of year until the last date of current year (2014)
how to do that with set analysis?
i'm lack a little bit of this
many thx before
thx massimo, i try to combine yours with sokkorn's and it works just like i want to
and the script is :
=if(GetSelectedCount(year)>0,
sum({$ <year={"<=$(=max(year))"}> } sales), // all years until max selected
Sum({<orderdate = {">=$(=YearStart(orderdate))<=$(=Date(Max(orderdate)))"} >} sales) // max year
)
GetSelectedCount (or GetPossibleCount) to check how many years selected/possible in Year field
=if(GetSelectedCount(Year)>0,
sum({$ <Year={"<=$(=max(Year))"}> } Expression1), // all years until max selected
sum({$ <Year={$(=max(Year))}> } Expression1) // max Year
)
Hi Rendi,
Here is concept.
=Sum({<Date = {">=$(=YearStart(Date))<=$(=Date(Max(Date)))"} >} Sales)
Can you attached your app?
Regards,
Sokkorn
thx massimo, i try to combine yours with sokkorn's and it works just like i want to
and the script is :
=if(GetSelectedCount(year)>0,
sum({$ <year={"<=$(=max(year))"}> } sales), // all years until max selected
Sum({<orderdate = {">=$(=YearStart(orderdate))<=$(=Date(Max(orderdate)))"} >} sales) // max year
)
thx sokkorn, it really helpful