Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to load Dimension Dynamically

i have a table of dept

idNamelocid
1Finance10
2Account20
3Sales30
4HR10
5Finance20
6Finance30
7HR20

now i want to

FOR mycounter = 1 to 3

loc & $(mycounter)*10: //dynamically dimenstion name

load

id as loc & $(mycounter)*10 & "_id",

name as loc & $(mycounter)*10 & "_name";


SQL

SELECT

id,name

FROM dept

where locid = $(mycounter)*10;

NEXT

mycounter is multiplying with 10

there are syntax errors

i want

loc10:

loc20:

lco30:

three dimension

can i do this in qlikview?


1 Reply
tresesco
MVP
MVP

possibly you are missing Quotation marks (Single). You have to use 'LOC' rather than simple LOC, because it would be treated as string. when you put LOC alone, QV finds for field of the same name.

Hope this helps you.

Regards, tresesco