Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
MatteoBerlaSV
Partner
Partner

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
Partner
Author

It works perfectly, thank you very much!!