Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
annabergendal
Partner
Partner

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

View solution in original post

annabergendal
Partner
Partner

This works fine, thanks!

annabergendal
Partner
Partner

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 []