5 Replies Latest reply: Nov 28, 2016 11:36 AM by Luiz De Paula

# How to make pie chart of sum of metrices as dimensions ?

-----  QLIKSENSE --------

I have made 3 tables in one of the sheets which are shown below

Table 1 - Blog table -  ( Used formulae -->  if(WildMatch((landingPagePath, ' */blog* '),landingPagePath) )

Blog pagesPage views
/blog/blog13
/blog/blog28
/blog/blog316
Total27

Table 2 - Product table -  ( Used formulae -->  if(WildMatch((landingPagePath, ' */product* '),landingPagePath) )

Product PagesPage views
/product/product15
/product/product26
/product/product39
/product/product422
Total42

Table 3 - Vacancy table -  ( Used formulae -->  if(WildMatch((landingPagePath, ' */vacancy* '),landingPagePath) )

Vacancy PagesPage views
/vacancy/vacancy110
/vacancy/vacancy22
/vacancy/vacancy33
/vacancy/vacancy41
Total16

I made these tables in one sheet and on the same sheet, I would like to display a pie chart which shows how many blog,product and vacancy pages are visited. This means, I want to make a pie chart of below mentioned table (this table is in my mind , not in the sheet)

pagesPageviews
blog pages27
product pages42
vacancy pages16

To make a pie chart, I used the similar formula (mentioned above)

dimension -  if((WildMatch(landingPagePath, '*/blog*') or WildMatch(landingPagePath, '*/product*') or WildMatch(landingPagePath, '*/vacancy*')) , landingPagePath)

measure -  sum(pageviews)

The result of abpve formula was that, I got pie chart of below mentioned table

pagespageviews
/blog/blog13
/blog/blog28
/blog/blog316
/product/product15
/product/product26
/product/product39
/product/product422
/vacancy/vacancy110
/vacancy/vacancy22
/vacancy/vacancy33
/vacancy/vacancy41

Can anyone help me with formula to be put in pie chart dimensions or measure fileds ?

• ###### Re: How to make pie chart of sum of metrices as dimensions ?

Hello Ishu,

Is the measure the same for all of them "Page views", and you want to be able to create dimensions by filtering with some restrictions?

• ###### Re: How to make pie chart of sum of metrices as dimensions ?

I am sorry Luiz, I am not able to understand your question.

But I found a solution for it and my task is done now

Here is the solution for the pie chart

Dimension :-

=ValueList('Blog Pages','Product Pages','Vacancy Pages')

Measure :-

IF( ValueList('Blog Pages','Product Pages','Vacancy Pages') = 'Blog Pages',

Sum(   if(WildMatch(landingPagePath, '*/blog*')  , pageviews ) )

,

IF( ValueList('Blog Pages','Product Pages','Vacancy Pages') = 'Product Pages',

Sum(   if(WildMatch(landingPagePath, '*/product*'), pageviews ) )

,

Sum(   if(WildMatch(landingPagePath, '*/vacancy*'), pageviews ) )

)

)

• ###### Re: How to make pie chart of sum of metrices as dimensions ?

Ishu,

I think you might be complicating the solution. The ValueList function is good to use when you have different measures that you want combine them into one pie chart.

As you have only one measure, [Pages Views], all you have to do is to apply an IF condition to the dimension. Try the example below.

Dimension:

if(WildMatch(landingPagePath, '*/blog*'),'Blog',

if(WildMatch(landingPagePath, '*/product*'), 'Product', 'Vacancy'))

Measure:

Sum(pageviews)

You don't need the ValueList as it is all in one measure.

Cheers,

LD

• ###### Re: How to make pie chart of sum of metrices as dimensions ?

Thanks Luiz,

It is also working.

• ###### Re: How to make pie chart of sum of metrices as dimensions ?

You are Welcome.

This way also, will facilitate in case if you need to apply Set Analysis to the measure.

Good luck,

LD