Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
kvr9
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.

6 Replies
devarasu07
Honored Contributor II

Re: Pie chart percentage calculation

Hi,

Try like this

Method 1:

Fact:

LOAD Company,

     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)

Capture.JPG

kvr9
Contributor

Re: Pie chart percentage calculation

Thank you Devarasu.

It works.

devarasu07
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

kvr9
Contributor

Re: Pie chart percentage calculation

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

akpofureenughwu
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   

devarasu07
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.

Capture.JPG

More check this,

Qlik Community Tip: Marking Replies as Correct or Helpful