Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with expression labels

Hello everyone,

I have a data like this it's a world wide customer data of a company

I'm making a straight table based on customer countries and locations

I want separate label of country name for each colomm

When I'm trying to label my customer countries by using a set variable in script it's not showing any error and at the same time it's not giving me any output

My expression on script side is this

For a=1 to 40

Set vcountry $(a) = fieldvalue( 'Country' , $(a));

When I'm trying to display labels with above variables it's not showing any data

Like vcountry1 =

Vcountry2 =

So can u suggest me any way that I can label my each and every colomn using loops in scripting

Or is there any wrong in my script .

Thanking u all

Brad

4 Replies
Not applicable
Author

Hi,

try this syntax. I believe you should use let instead of set:

LOAD * INLINE [
    Country
    SE
    DE
    DK
    FE
];


For a=1 to 4

     let vcountry$(a) = fieldvalue( 'Country' , $(a));

next

Good luck,

Jonas

www.optivasys.se

QlikView Consultant

Not applicable
Author

Hi Jonas

Thanks for your reply

I tried let instead of set but when I'm using let now it's not even showing me the variables vcountry also

Is there any other way to solve this ...

Thanks a lot Jonas

Brad

deepakk
Partner - Specialist III
Partner - Specialist III

Hi Brad,

If you want the name as Column then just drag the dimension to top of the expression. It will serve your purpose.

In the attach application I have displayed both ways,

I hope this helps.

Deepak

Not applicable
Author

Thanks Deepak ,

I know we can do that in a pivot table but my req. is a straight table and i'm trying to write a loop for a runtime variable which stores those values in the specified colomn ...

thanks a lot

Bradd