
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Help with Pie Chart
I have a Dimension with values A to Z, let's call it Alphabet, and Measure called Sales.
I want to compare the sum of Sales for two groups of Alphabet, and visualise it with a pie chart.
If I wanted to create two separate KPIs, I would use these expressions:
Sum({<Alphabet={'A','B'}>} Sales)
Sum({<Alphabet={'B','C','D'}>} Sales)
But how do I write an expression for the pie chart to show those two totals?
Something like this mock-up:
Thanks in advance,
Dan
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, @dan205
one solution I see would be for you to be working with ValueList,
ex:
dimension: ValueList('GrupoAB','GrupoBCD')
measure
if(ValueList('GrupoAB','GrupoBCD')='GrupoAB',
Sum({<Alphabet={'A','B'}>} Sales)
,
if(ValueList('GrupoAB','GrupoBCD')='GrupoBCD',
Sum({<Alphabet={'B','C','D'}>} Sales)
))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, @dan205
one solution I see would be for you to be working with ValueList,
ex:
dimension: ValueList('GrupoAB','GrupoBCD')
measure
if(ValueList('GrupoAB','GrupoBCD')='GrupoAB',
Sum({<Alphabet={'A','B'}>} Sales)
,
if(ValueList('GrupoAB','GrupoBCD')='GrupoBCD',
Sum({<Alphabet={'B','C','D'}>} Sales)
))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perfect, thank you.
