Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Aggregating Dimension

Hello everyone.

There are five stores with their sales, and everyone of these is identified by a code. Two of these stores changed their codes two times. In Qlik I have the sum of sales for everyone of this five stores depending on their codes: this means that if the store changed codes three times, in Qlik I see the sum of sales for each of these codes (note that the store is always the same). So, I visualize nine stores.

My target is to visualize only the five stores, and get the aggregate of sales for the two stores that changed code.

Here's an example:

Store     Sales

A          100

B          90

C          80

D          70         
E          60

F          50

G          40

H          30

I          20

Store A, before having the code 'A', had the code 'F' and 'G'. F made sales for 50, G made sales for 40.

Store B, before having the code 'B', had the code 'H' and 'I'. H made sales for 30, 'I made sales for 20.

The final result is:

Store     Sales

A          190

B          140

C          80

D          70         
E          60

How can I do this?

Tags (3)
3 Replies

Re: Aggregating Dimension

Create a table that maps store names to the original store

SalesMap:

LOAD * INLINE [

OriginalStore, Store

A, A

A, F

A, G

B, B

B, H

B, I

C, C

D, D

E, E

];

Sales:

LOAD Store, Sales From ... ;

Then use the field OriginalStore as dimension and sum(Sales) as expression in a straight table object.


talk is cheap, supply exceeds demand
Not applicable

Re: Aggregating Dimension

Thanks Gysbert,

But I have another problem: How I do mapping?

Re: Aggregating Dimension

I have no idea. If you don't keep track of which stores get renamed to what then what you want is not possible. That information has to be recorded somewhere. If the information does not exist then Qlikview can't use it.


talk is cheap, supply exceeds demand
Community Browser