Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
annabergendal
Partner - Creator
Partner - Creator

Variable naming x weeks ago

I'm looking for proper names I can use for weeks defined as variables.

I have set up variables defining last week, the week before last, the week 3 weeks back etc. For 8 weeks back.

The logic works fine, just looking for a good naming standard.

"vCurrentWeek-1" for last week, "vCurrentWeek-2" for the week before last etc would have been perfect.

But QV doesn't like the "-"

Ideas?

Thanks!

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Try

[vCurrentWeek-1]

[vCurrentWeek-2]

etc


Updated: This will not work.

use vCurrentWeek-1

vCurrentWeek-2

and while using variables.. you need to add [].

So While using these variables.. use [vCurrentWeek-1] and [vCurrentWeek-2] etc

View solution in original post

3 Replies
MK_QSL
MVP
MVP

Try

[vCurrentWeek-1]

[vCurrentWeek-2]

etc


Updated: This will not work.

use vCurrentWeek-1

vCurrentWeek-2

and while using variables.. you need to add [].

So While using these variables.. use [vCurrentWeek-1] and [vCurrentWeek-2] etc

annabergendal
Partner - Creator
Partner - Creator
Author

This works fine, thanks!

annabergendal
Partner - Creator
Partner - Creator
Author

Actually, it works fine when defining locally in the app, but I'm using Variable Editor in QDF and this doesn't allow me to put in "-", even when I'm using brackets []