Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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)
))
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)
))
Perfect, thank you.