Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sibusiso90
Creator III
Creator III

Legends values

Hi All,

I am trying to get legend values in the correct place. I don't have any dimension they are all expressions.

Is this possible though.

E.G
I currently have the below
Capture.PNG

My result is below
Untitled.png

1 Solution

Accepted Solutions
felipedl
Partner - Specialist III
Partner - Specialist III

Hi Sibusiso,

Do the following,

as for the dimension, use the following code:

=Valuelist('Sale','AVG','MAX')

and for expression do:

=pick

(

    match

    (

          Valuelist('Sale','AVG','MAX'),

          'Sale','AVG','MAX'

),

//Expression for sale

sum(Sales),

//Expression for AVG

avg(Sales),

// Expression for max

max(Sales)

)

As an example, i've loaded this:

load * Inline

[

Sales

1

2

3

4

5

6

7

8

9

10

];

And got the following with the mentioned expression and dimension:

Sample.png

Attached the file I used

View solution in original post

3 Replies
Or
MVP
MVP

Select the chart, hold down CTRL+SHIFT, and drag the legend where you want it.

sibusiso90
Creator III
Creator III
Author

I don't want to move the legends I want them to appear as they would if I had a dimension

felipedl
Partner - Specialist III
Partner - Specialist III

Hi Sibusiso,

Do the following,

as for the dimension, use the following code:

=Valuelist('Sale','AVG','MAX')

and for expression do:

=pick

(

    match

    (

          Valuelist('Sale','AVG','MAX'),

          'Sale','AVG','MAX'

),

//Expression for sale

sum(Sales),

//Expression for AVG

avg(Sales),

// Expression for max

max(Sales)

)

As an example, i've loaded this:

load * Inline

[

Sales

1

2

3

4

5

6

7

8

9

10

];

And got the following with the mentioned expression and dimension:

Sample.png

Attached the file I used