Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I would like to know if is posible this issue:
There is a ítem call "week", every week, the DB is updated with the last week information added.
i want to fix in the scripting of a chart expression only to show the last week information,
Is this posible?
Thanks a lot!
In fact - yes. There is the 4th optional parameter in the InWeek() function for the week start. Probably it is -2 in your case, but I'm not sure, try to experiment with it:
sum(if(InWeek(Date, today(),0,-2),pax))
week( '1971-10-30' ) returns 43 ---take latest week always.
else play with these
No, this does not work, is inside the expression of a table chart:
now I am trying with a week_id that has numbers( 1,2,..53) and fixing in the expression the last week but i do not know how to do the expression
For example if i am in 43 week id and i want (without sellecting in qlikview) inside the expression fix in the chart always the last week i mean the week 42.
Is an stupid example because i dont know how... thanks
sum({$<[week_id]=(week_id -(week_id-1)>}pax
How can i do it in a expression like this? thanks a lot for your support
Do you have a Date field in your data? If yes, you don't need week id at all, just use condition in the expression to calculate the data for the Dates in the current week, for example
sum(if(InWeek(Date, today(),0),pax))
Thanks Michael. It Works!.. but to complicate more things my weeks are difined from saturday to friday.. Not from monday to sunday .. is there any way to change InWeek in this ranges?
Thanks!
In fact - yes. There is the 4th optional parameter in the InWeek() function for the week start. Probably it is -2 in your case, but I'm not sure, try to experiment with it:
sum(if(InWeek(Date, today(),0,-2),pax))
Thanks Michael! you have been very helpful!