Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
MatteoBerlaSV
Partner - Contributor
Partner - Contributor

pie chart measure and dimension from Array values

Hi everyone, 

i'm trying making a pie chart with these features:

A measure which must have custom values given from an array(i can't retrieve them from any table) ex. myArray['me','bob','jack']

A dimension which must have an expression as value, related to each of the user inside myArray ex. myExpressionArray['=Sum(MyCandies)','=Sum(BobCandies)','=Sum(JackCandies)']

and display it in a pie chart.

At the moment i've displayed the sum of each user in a KPI but i want to display it also in a chart so i'll be able to see the % of each users (obviously i'll display an amount of money not candies )

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

May be try this

Dimension

ValueList('me', 'bob', 'jack')

Expression

Pick(Match(ValueList('me', 'bob', 'jack'), 'me', 'bob', 'jack'),
Sum(MyCandies),
Sum(BobCandies),
Sum(JackCandies))

 

View solution in original post

2 Replies
sunny_talwar

May be try this

Dimension

ValueList('me', 'bob', 'jack')

Expression

Pick(Match(ValueList('me', 'bob', 'jack'), 'me', 'bob', 'jack'),
Sum(MyCandies),
Sum(BobCandies),
Sum(JackCandies))

 

MatteoBerlaSV
Partner - Contributor
Partner - Contributor
Author

It works perfectly, thank you very much!!