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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add different dimensions

Good afternoon,

I have three wineries represented in tables SKU, such as image STOCK

bodegas.png

I need to add the stock and show the final stock of each SKU, the problem is that the 3 wineries not necessarily have the same SKU, so I can not do addition.

stock_final.png

can you help me?

1 Solution

Accepted Solutions
sfatoux72
Partner - Specialist
Partner - Specialist

The previous expression works only on lowest level (Sku)

In aggregated level (Manufacturer) you need to use :

RangeSum(Sum([stock A]), Sum([stock B]), Sum([stock C]))

This expression works in lowest level too.


Don't forget to mark the answer "Correct" to help others.

View solution in original post

8 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

If different sku's (one for each winery) refer to the same product, map the different sku's to a common one (of your own invention, maybe an automatically generated number for internal QlikView use)

Sooner or later you'll have to tighten things up (tie the tables together)

daveamz
Partner - Creator III
Partner - Creator III

Hi,

Try =RangeSum([stock A], [stock B], [stock C])

Regards,

David

sunny_talwar

‌So are you saying that sku2 from one winery = sku5 in 2nd winery? How would you even know which sku's are the same from different winery? Do you have some kind of key which maps them? unless you have that, I don't see how you will make this work.

sfatoux72
Partner - Specialist
Partner - Specialist

Hi Jorge,

When you make an addition ( [stock A]+[stock B]+[stock C] ), if one of the element is NULL, the result will be NULL.

To avoid that, you need to use the Range function ( RangeSum([stock A], [stock B], [stock C]) ).

2016-01-08 23_37_56-QlikCommunity_Thread_198951.png

Not applicable
Author

Thanks Sebastien, thats works fine for me, now i have another problem,

in the same example i need group RangeSum([stock A], [stock B], [stock C]) and Sku's by another dimension "Manufacturer"

qty_stock_by_manufacturer.png

Where:

SKU = Count(Manufacturer) - this expression its different to Sku Dimension

Stock Final = RangeSum([stock A], [stock B], [stock C])

But that isnt working,

Could you help me?

sfatoux72
Partner - Specialist
Partner - Specialist

The previous expression works only on lowest level (Sku)

In aggregated level (Manufacturer) you need to use :

RangeSum(Sum([stock A]), Sum([stock B]), Sum([stock C]))

This expression works in lowest level too.


Don't forget to mark the answer "Correct" to help others.

Not applicable
Author

Thanks!!!

thats works fine!

oknotsen
Master III
Master III

If your question is answered, please flag the Correct Answer.

If not, please let us know what part of the current topic needs more explaining.

May you live in interesting times!