# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Valued Contributor

## Pie chart with limited dimension

Hi All,

I have a simple table

 Summary Data AAA 5000 BBB 8656 CCC 290 DDD 5979 EEE 3995

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.

1 Solution

Accepted Solutions
Luminary

## Pie chart with limited dimension

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.

6 Replies
Luminary

## Pie chart with limited dimension

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.

MVP

## Pie chart with limited dimension

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

SummaryGroups:
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.

Highlighted
Valued Contributor

## Pie chart with limited dimension

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

Luminary

## Pie chart with limited dimension

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.

Valued Contributor

## Pie chart with limited dimension

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.

Valued Contributor

## Pie chart with limited dimension

John,

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

Regards

Ren