Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview Dimension Calculate

Hi !
  I would like to know if it is posible to calculate a dimension like this:
I have a table with only this

Country_Sells:

LOAD * INLINE [

    Country, Import

    Espain, 1000

    France, 2000

    Argentina, 500

   

];

I can create this graph !

But I would like to create a a new value for country . I would like to create "UE" , this will be the sum of ESPAIN + FRANCE.

Is there any chance I can do this???

Thank you very much!!!!

1 Solution

Accepted Solutions
jujucts
Partner - Creator II
Partner - Creator II

Hi Rodrigo

yes, 2 solutions :

you can add a field in your script like if (Country ="Spain" or Country="France", "EU", otherValue) as MetaCountry

or use the same formula as Calculated Dimension in the chzart

best regards

View solution in original post

11 Replies
jujucts
Partner - Creator II
Partner - Creator II

Hi Rodrigo

yes, 2 solutions :

you can add a field in your script like if (Country ="Spain" or Country="France", "EU", otherValue) as MetaCountry

or use the same formula as Calculated Dimension in the chzart

best regards

Not applicable
Author

Hi juju,

Thanks for your response !
The problems is  that i still want to see spain, france  but I will like to add UE en a column

Something like this

As I undestand your solutions, I would only see UE and Argentina with the MetaCountry Dimension. Did I undestood wrong?

Thanks a lot for your help!

PD: the value for EU is 3000. The sum of  France (2000) and Espain (1000). I wrote 1500, but is wrong !!!!

chrismarlow
Specialist II
Specialist II

If you really want that type of display in your chart I think you need to introduce another table that duplicates up your countries;

Country_Map:

LOAD * INLINE [

    Country, Country_Region

    Espain, Espain

    France, France

    Argentina, Argentina

     Espain, EU

    France, EU

];

jujucts
Partner - Creator II
Partner - Creator II

No you will see both

you keep your field country (FR, SP, ARG...) and you have a above hierarchical field like Region with EU, ARG

best regards

chrismarlow
Specialist II
Specialist II

Can't get the image to insert - but shown on QVW.

Not applicable
Author

Geniusssss !!!

Will you marry me?? jajajajajaaj

Thanks a Lot  my friend !!!!

Not applicable
Author

Hi Chistopher !

I am sorry but I need a little more help..
When I use this solution the partials SUM does not work correctly when I expand or compact the PIVOT GRID.

Can you help me to finish solve this problem?

Thanks !!

jujucts
Partner - Creator II
Partner - Creator II

Hi Rodrigo

Or much more like this

Best regards

Christian JUILLARD | Sr Manager EIM, France | Cognizant

1-3 rue du Château | 92200 Neuilly-sur-Seine | France

t. +33 (0)1 70 36 56 57 (direct xx) | m. +33 (0)6 21 89 03 94

e. christian.juillard@cognizant.com<mailto:christian.juillard@cognizant.com> | w. www.cognizant.com<http://www.cognizant.com/>

P Please think about the environment before printing

Not applicable
Author

Hi JUJU !!
I understand your idea but I need  all toghether like this:

Country:
Argentina   500

          men 400

          women  100
Spain        1000

          women 500

         men 500

France      2000

         men 1000

         women 1000

Eu             3000

     women 2000

      men 1000

The problem I am having is when I contract the dimension.. The sum Is not the same.