# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Highlighted
Contributor

## Pie chart percentage calculation

Hi ,

I'm looking for a pie chart calculation.

I want to display company name along with Sales Percentage and Sales with a data restriction.

My table contains below coulmns:

Company,Sales,Year,Product

A     ,109,2015,aa

B     ,106,2015,aa

C     ,103,2015,aa

D     ,110,2015,aa

A     ,105,2016,bb

B     ,107,2016,bb

C     ,104,2016,bb

D     ,101,2016,bb

I want to restrict my data by company(A,B,C) and product(aa), Could you someone help to calculate the pie chart percentage with above conditions.

Please find the sample data my qvw.

Tags (3)
6 Replies
Honored Contributor II

## Re: Pie chart percentage calculation

Hi,

Try like this

Method 1:

Fact:

Sales,

Product,

Year

FROM

(ooxml, embedded labels, table is Sheet1) where  Match(Company,'A','B','C') and Product='aa';

Chart: measure expression as

Sales %

sum(Sales)/sum(TOTAL Sales)

Method 2:

using set analysis method at chart - Sales % expression

sum({<Company={'A','B','C'},Product ={'aa'}>}Sales)/sum(Total {<Company={'A','B','C'},Product ={'aa'}>} Sales)

Contributor

## Re: Pie chart percentage calculation

Thank you Devarasu.

It works.

Honored Contributor II

## Re: Pie chart percentage calculation

Hi,

Np. Can you close this thread by marking correct. it might useful for other who is having similar issue. Thanks

Regards,

Deva

Contributor

## Re: Pie chart percentage calculation

Could you please tell me how to close the tread,as I'm new to this community

Contributor III

## Re: Pie chart percentage calculation

Hello VijAYA. Beneath the  comment made by Devarasu, you will see the action tab, click on it, you will see various option, click on correct answer and you are there

Regards

Honored Contributor II

## Re: Pie chart percentage calculation

Hi,

Go to my 1st report with solution section then u can see like below screen mark as answered.

More check this,

Qlik Community Tip: Marking Replies as Correct or Helpful