Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I created two variable:
Month1= Text(Month(max(PER_RIF)))& Text(Year(max(PER_RIF)))
Month2= Text(Month(max(PER_RIF-1)))& Text(Year(max(PER_RIF-1)))
Now, I want to do some sum.
I try to use:
=sum({<{per_rif=$(date(Month1))}>} [Incassato_Altro _nel _periodo])
But when I try to set the sum it fails.
I can’t selection nothing because I want to automatizaren all things.
What Am I doing wrong ?
Thanks in advance.
I'm sorry, I forgot to erase some characters from your formula that were wrong... try:
=sum({$<PER_RIF={">=$(=MonthStart(Max(PER_RIF)))<=$(=MonthEnd(Max(PER_RIF)))"}>} [Incassato_Altro _nel _periodo])
I think your set analysis is incorrect, but also I suspect your variables are wrong.
According yo your variables, you get the month and the year from the same field: PER_RIF. Does PER_RIF has date values? If it's so... then you could do something like this:
=sum({<{PER_RIF={">=$(=MonthStart(Max(PER_RIF)))<=$(=MonthEnd(Max(PER_RIF)))"}>} [Incassato_Altro _nel _periodo])
That would give you the sum of [Incassato_Altro _nel _periodo] values for the max MonthYear selected or available (the 30 or 31 days included in the Month).
I think this example from Steve Dark may hel you a lot to learn about playing with Dates in Set Analysis.
http://community.qlik.com/docs/DOC-4313
Regards!
Hi Carlos,
thanks for the reply. But if I use your script in my object the result is: "-".
The PER_RIF field has a date value. I read your suggestion article by Steve Dark but i don't understand where i need to use that script in my own one. Follow a screenshot that i hope will help you to better understant my issue.
Thanks in advance.
Check your curly brackets (i.e. { and } )
I believe you have put one opening curly bracket too much into your expression directly before the field name PER_RIF. Remove this one.
I'm sorry, I forgot to erase some characters from your formula that were wrong... try:
=sum({$<PER_RIF={">=$(=MonthStart(Max(PER_RIF)))<=$(=MonthEnd(Max(PER_RIF)))"}>} [Incassato_Altro _nel _periodo])
thanks thanks!!!!!!!!
it's right!!!!!!!
thanks you
it's right!!!!!!!
thanks you!
Regards!
Hi, sorry, I have the same problems but for precedetent month.
How can i do this?
My date are simililar of ciroscar's date.
Thanks in advance.
sorry, I'm finding solution in article by Steve Dark.
thanks a lot