Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pivot Table

Hi

Following is the screen shot of my application.

It shows the Sales of various city across continents.

Capture1.PNG

There are three dimensions involved here. Continent ,City, Month.

When i select a city say Tokyo i expect the below highlighted Row to display entire Asia's Total.

Capture100.PNG

Also i expect the World total(Sum of three continents) displayed at the last row (Highlighted in the below image)

Capture101.PNG

So using dimensionality and set analysis the implementation is done.

But by problem is when i select Tokyo,

I expect Tokyo's total along with Asia's total(Sum of Tokyo+Sum of Delhi) and

World total(Sum of Asia + Sum of Aus + Sum of Europe) to be shown.

Please follow the below image to understand what i expect.

Capture105.PNG

But the other city's values are also displayed as '-' like,

Capture22.PNG

Could any one help me on this please.

Have attached my sample application.

Please let me know if further information is required on this.

Thanks!

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Is this what you need?

=Pick(Dimensionality() + 1,

  sum({<Continent, City, Month>} Numerator) / Sum({<Continent, City, Month>} Denominator),

  Sum({<City, Month>} Numerator) / Sum({<City, Month>} Denominator),

  Sum({<Month>} Numerator) / Sum({<Month>} Denominator),

  Sum(Numerator) / Sum(Denominator)) * 1000

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

14 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Is this what you need?

=Pick(Dimensionality() + 1,

  sum({<Continent, City, Month>} Numerator) / Sum({<Continent, City, Month>} Denominator),

  Sum({<City, Month>} Numerator) / Sum({<City, Month>} Denominator),

  Sum({<Month>} Numerator) / Sum({<Month>} Denominator),

  Sum(Numerator) / Sum(Denominator)) * 1000

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

I used the above expression and when i selected tokyo i still get the look as,

Capture22.PNG

I want only Tokyo to be displayed with Continent and Global total. Like,

Capture105.PNG

I dont want to see the ones marked in blue(1st image)

jonathandienst
Partner - Champion III
Partner - Champion III

=Pick(Dimensionality() + 1,

  sum({<Continent, City, Month>} Numerator) / Sum({<Continent, City, Month>} Denominator),

  If(Count(City) > 0, Sum({<City, Month>} Numerator) / Sum({<City, Month>} Denominator)),

  Sum({<Month>} Numerator) / Sum({<Month>} Denominator),

  Sum(Numerator) / Sum(Denominator)) * 1000

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Thanks for the reply.

But still i am able to see the other city's data displayed as '-'

Capture22.PNG

Is there an way to get rid of this?

jagan
Partner - Champion III
Partner - Champion III

Hi Koushik,

It is working correctly with the jontydkpi expression for me.  Please find attached file.

Regards,

jagan.

Anonymous
Not applicable
Author

Hi Jagan Mohan

Thanks for the reply.

Ya the expression works.

But  i still find  '-' displayed for other city.

Capture22.PNG

In the above screenshot the selected City is 'Tokyo'.

I dont want '-' displayed for other cities.

I expect it to like,

Capture105.PNG

It should only display Tokyo(Because tokyo is selected).

I dont want to see '-'.

Is there an way to implement this?

jagan
Partner - Champion III
Partner - Champion III

Hi,

Which version are you using?  I am using Qlikview 11.2 SR5 it is working fine for me.

Regards,

jagan.

Anonymous
Not applicable
Author

I am using SR3.

Can you please send me a screenshot of how it looks in SR5 when Tokyo is selected.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Check this

Untitled.png

Regards,

Jagan.