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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
renjithpl
Specialist
Specialist

Aggregation Issue

Hi All,

I have attached a qvw where my data aggregates same for all available ID's.

Please have a look at this and suggest the possible way to get this done.

Regards

Ren

9 Replies
Not applicable

prepare your trasaction as follows :

Transaction:

Load *,

rowno() as Rowno

from XXX

;

add rowno in chart dimension

its_anandrjs
Champion III
Champion III

Hi,

Load like this

Transaction:

LOAD * INLINE [

    ID, Amount

    IAA, 200

    IAA, 300

    IBB, 400

];

Left Join

LOAD * INLINE [

    ID, SubName

    IAA, Puma1

    IAA, Puma2

    IBB, xyz

];

Main:

LOAD

*,

RowNo() as Rownum

Resident Transaction;

DROP Table Transaction;

And in chart add Rownum as dimension and if you dont want to display this then hide this from

Chart properties -> Presentation -> Select column name and hide column

Hope this helps

Thanks & Regards

arsal_90
Creator III
Creator III

Please find the attached file for ur solution

renjithpl
Specialist
Specialist
Author

Hi Muhammad the answer looks fine for me, i will test this and get back to you.. till then its a helpful answer.. Will do a unit test before implementing this logic.. thanks

ThornOfCrowns
Specialist II
Specialist II

Nice solution.

arsal_90
Creator III
Creator III

ok no issue

its_anandrjs
Champion III
Champion III

Hi,

You can do this way also for aggregation

A:

LOAD * INLINE [

    ID, Amount

    IAA, 200

    IAA, 300

    IBB, 400

];

B:

LOAD * INLINE [

    ID, SubName

    IAA, Puma1

    IAA, Puma2

    IBB, xyz

];

NoConcatenate

MainA:

load

ID as IDkey,

Amount,

RowNo()&'/'&ID as Key

Resident A;

DROP Table A;

NoConcatenate

MainB:

LOAD

ID as IDkey2,

SubName,

RowNo()&'/'&ID as Key

Resident B;

//RENAME Field ID to IDkey;

DROP Table B;

Hope this helps

Thanks & Regards

renjithpl
Specialist
Specialist
Author

Hi

Its not working for this example..

Transaction:

IDAmount
PROWARTRUS                  254,837,905.07
PROWARTRUS                   24,106,288.29
HBSTRUNO1                   60,092,758.35
HBSTRUNO1                  296,689,271.56
PUMASTS8-1                  77,957,351.00
PUMASTS8-1                 171,344,128.00
PUMASTS8-1                  30,000,000.00
PUMASTS8-1                  65,800,000.00

Master:

IDSubName
PUMASTS8-1PUMA Masterfund S-8 (Class A2)
PUMASTS8-1PUMA Masterfund S-8 (Class AB)
arsal_90
Creator III
Creator III

Hi Renjith

Basically if i m not wrong you are dealing with Master data sales.

Let suppose 2 categories: Category for Toy  Sub category for toy

generally if sales Occurred then sales table i mean transaction tables also hit with sub category. Let suppose if u r in a shop and buy Toys. so transaction table hit with Sub category. there are two brands in Sub category : Puma1 and Puma 2 but both are belongs to Category Field in which category is Puma. So what u want is logically not possible for huge data. Please elaborate your database table in detail and whats your requirement?