Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
renjithpl
Specialist
Specialist

Pie chart with limited dimension

Hi All,

I have a simple table

SummaryData
AAA5000
BBB8656
CCC290
DDD5979
EEE3995


I want to show in a pie chart only the values of AAA and BBB in the dimension also a "None" where it should SUM the data of AAA +BBB.

Please guide me.

thanks in advance.

1 Solution

Accepted Solutions
pover
Luminary Alumni
Luminary Alumni

Here's a possible solution if I understand you right. The dimension would be a valuelist('AAA', 'BBB','None') and then the expression would be

pick(match(valuelist('AAA', 'BBB','None'),'AAA', 'BBB','None'),

sum({$<Customer={'AAA'}>} Sales),
sum({$<Customer={'BBB'}>} Sales),
sum({$<Customer={'AAA','BBB'}>} Sales)
)

It's a pretty rigid solution (the use of the function valuelist is usually my last resort), but it might be what you need. If not, please tell us more what you are looking for and we'll give it more thought.

Regards.

View solution in original post

6 Replies
pover
Luminary Alumni
Luminary Alumni

Here's a possible solution if I understand you right. The dimension would be a valuelist('AAA', 'BBB','None') and then the expression would be

pick(match(valuelist('AAA', 'BBB','None'),'AAA', 'BBB','None'),

sum({$<Customer={'AAA'}>} Sales),
sum({$<Customer={'BBB'}>} Sales),
sum({$<Customer={'AAA','BBB'}>} Sales)
)

It's a pretty rigid solution (the use of the function valuelist is usually my last resort), but it might be what you need. If not, please tell us more what you are looking for and we'll give it more thought.

Regards.

johnw
Champion III
Champion III

You could make a new field for summary groups. Something like this:

SummaryGroups:
LOAD * INLINE [
SummaryGroup, Summary
AAA,AAA
BBB,BBB
None,AAA
None,BBB
];

Then just use SummaryGroup as your dimension instead of Summary. See attached.

And I definitely wouldn't call the AAA+BBB group "None", but I assume this is just an example.

renjithpl
Specialist
Specialist
Author

Hi Karl,

Thanks a lot, your example worked half way. But in "None" its giving the total of (AAA+BBB+CCC+DDD+EEE). I want only the total of (AAA+BBB) in "None". Hope you have the solution for this. Thanks in advance.

Ren

pover
Luminary Alumni
Luminary Alumni

Ren,

With set analysis the total should be limited to AAA and BBB. Post the actual formula you are using for the dimension and the actual formula you are using for the expression and we'll revise it.

Regards.

renjithpl
Specialist
Specialist
Author

Hey Karl,

I am really sorry, i made a small mistake in the formula which you posted, i have corrected it. Its working fine. Thanks a lot. Smile

renjithpl
Specialist
Specialist
Author

John,

Your example worked fine. But for now i am using Karls formula. Thanks a lot.

Regards

Ren