Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Values are not matching in straight table

hello,

I have the below data in separate straight tables for AA, BB and CC analysis for 2014

I have to get an aggregated chart to represent the totals of all 3 in total sales and individual sales for AA,BB and CC for respective destinations for 2014.

The Individual totals from the aggregated table for AA,BB and CC are not matching with the Individual tables.

I performed joins and got all the data into one single aggregated qvd and pulling that data in to reports and the numbers don't match.

Attached is my QVW.

Can someone please help me with this.

Thanks!

11 Replies
morganaaron
Specialist
Specialist

How are you joining the data to get the aggregated QVD? Can you post your script for generating the file?

Anonymous
Not applicable
Author

AGG:

Load

  ApplyMap('Map', [V_Code]) as [AT.TI Code],

  [Hotel Travel Date] as [AT. Travel Date],

    ApplyMap('Map1', [V_Code]) as [AT.CC Code],

  [V_Code] as [AT. V_Code],

  sum([Revenue]) as [AT. Revenue],

  sum([Sales]) as [AT.Sales]

Resident [Inventory ]

Where Exists([AV_Code], [V_Code])

Group By [V_Code], [Travel Date]

;

Drop Table [Inventory];

outer Join (AGG)

LOAD

     [TI Code] as [AT.TI Code], 

     [TI  Date] as [AT. Travel Date],

     [TI Sales] as [AT.TI Sales],

     [TI Revenue] as [AT.TI Revenue]     

FROM

[XXXXX.QVD] (qvd)

Where Exists([TI V_Code], [TI Code])

;

outer Join (AGG)

LOAD 

     [Travel Date] as [AT. Travel Date],

     [V_ID] as [AT.CC Code],

     [Sales] as [AT.CC Sales],

     [Revenue] as [AT.CC Revenue]

FROM

[YYYY.QVD](qvd)

Where Exists([CC V_Code],[V_ ID]) ;

morganaaron
Specialist
Specialist

Sorry, can't really make sense of that without understanding which fields relate to the fields you're talking about in your tables! Any chance you can post your .qvw?

its_anandrjs

Hi,

I suggest you do Mapping first and then do the aggregation on the table and then create the SUM fields by aggregation by the field name is better way for load the table.

Hope this helps

Regards

Anand

Anonymous
Not applicable
Author

No... It didn't work 😕

Any other suggestions?

Thanks!

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

To join both table together I will do something like this

Hash128 ([AA Sales] & '|' & [BB Sales] & '|' & [CC Sales])               AS  %Key_Join

In both table and this will join the table for you.

Hope this helps

Anonymous
Not applicable
Author

Thanks for your help!

Gabriel
Partner - Specialist III
Partner - Specialist III

DDid that help?

please mark as helpful or answer

Anonymous
Not applicable
Author

I still have the same issue...

I used apply map and outer join to get data into my Aggregated QVD.

The values still don't match or not even close to the  values from production.

You need more information  to help me with this issue?