Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add a calculated dimention???

hi

I am tring to develop a simple pivot table and I have a problem :

here the example:

column A ,column B, column C

a aa 13

a dd 45

a ww 76

a dd 78

b vv 23

b bb 55

b hh 78

f uu 88

f aa 67

f uc 32

now, after I set the pivot table with the data I want to add a Dimention that representing a groups of column A

for example :

column A0, column A ,column B, column C

First a aa 13

First a dd 45

First a ww 76

First a dd 78

First b vv 23

First b bb 55

First b hh 78

second f uu 88

second f aa 67

second f uc 32

it can be done in a pivot table in excel in a few steps and I want to develop this in QV.
I want to do this without writing a code in the script window.
10X


5 Replies
Not applicable
Author

Hi,

you can try this way:

=If(CategoryName = 'Swimwear' or CategoryName = 'Sportswear', 'First', 'Second')

Good luck!

Rainer



sunil2288
Creator III
Creator III

Hi Haviv,

You Can try it as if((columnA='a' or columnA='b',First,Second))

Thanks

Suneel

Not applicable
Author

ok,

it should work

but what I can do if I have to do an Aggr function on 30 items? or more....

it's not fasible to write a lot of conditional IF.

I need somting that will make this very easy.

I reapet ,The person that using pivot table in excel is doing it very simple...

10X

Not applicable
Author

Hi,

Can you rephrase your query?

What is the criteria for First, Second etc.?

Regards,

Happy Thoughts

Or
MVP
MVP


havivdanny wrote:
I need somting that will make this very easy.
I reapet ,The person that using pivot table in excel is doing it very simple...
<div></div>


It's also very simple to do this in QlikView - all you have to do is use the Inline Load in your script to set the categories. This is exactly the same thing your Excel user is doing - manually assigning a new dimension to each old dimension value. Unfortunately, this has to be done via script, not via chart manipulation.