Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dreweezy
Partner - Creator II
Partner - Creator II

Table / Pivot table is not showing the total

I have a table, with a column named 'Amount'

Problem is when I bring it in to the table, and I do a sum, it for some reason double counts. When I take the aggregation out it shows me the correct numbers (as it should be according to my spreadsheet) but does not give me the total at the top like it should.

Snip provided

Capture1.PNG

Currently the measure syntax is: Amount

When I did sum(Amount) it was double counting but the total would show up. Once I take the sum aggregation the total disappears.

Labels (1)
4 Replies
marinadorcassio1
Partner - Creator
Partner - Creator

Hi,

 

I think you have a problem in your model.

May you join a sample app for the community to see and try to understand the problem ?

 

Regards,

Marina

dreweezy
Partner - Creator II
Partner - Creator II
Author

Here is my script - 

Unqualify *;

LIB CONNECT .....

[SALES_VW]:
LOAD
[SALES_PID] AS [LINE_ID-SALES_PID],
[STATUS],
[SALES_ACCOUNT],
[YEAR],
[SALE_ID_TYPE]
[CUSTOMER_ID] AS [CLIENT_ID-CUSTOMER_ID],
[AMOUNT_VW],

[NEW_COST],
[COST];

SELECT

[SALES_PID],
[STATUS],
[SALES_ACCOUNT],
[YEAR],
[CUSTOMER_ID],
[AMOUNT],
[COST]
FROM SQL....;

[CLIENT_VW]:
LOAD
[CLIENT_ID] AS [CLIENT_ID-CUSTOMER_ID],
[NAME],
[HEAD]
[JOB],
[NET_WORTH],
[STATE],
[CITY],
[COUNTY],
[ORDER_TYPE],
[TOTAL_SPENT],
[TOTAL_REWARDS],
[AGE];

SELECT

[CLIENT_ID],
[NAME],
[HEAD]
[JOB],
[NET_WORTH],
[STATE],
[CITY],
[COUNTY],
[ORDER_TYPE],
[TOTAL_SPENT],
[TOTAL_REWARDS],
[AGE];
FROM SQL.....;

[ADDITIONAL_VW]:
LOAD
[LINE_ID] AS [LINE_ID-SALES_PID],
[NAME],
[VALUE];

SELECT

"LINE_ID",
"NAME",
"VAL"
FROM SQL....;

left join (SALES_VW)
[Sheet1]:
LOAD
[JOIN_DATE],
[DAYS_JOINED],
[SALE_ID_TYPE],
[Amount]
FROM [lib://myfilepath/Additional_Columns_To_Add.xlsx]
(ooxml, embedded labels, ......)

 

I imported a new excel sheet that contains extra columns that I like to map to my current data set in qlik sense. So I should see JOIN_DATE, DAYS_JOINED and Amount to my existing data set joining on SALE_ID_TYPE which is why I have a left join on my excel spreadsheet. 

marinadorcassio1
Partner - Creator
Partner - Creator

Ok, and what is your aggregation formula ?

dreweezy
Partner - Creator II
Partner - Creator II
Author

I was able to figure this out. It seems like when I am doing the left join, on the back-end something is being calculated so that it double counts my amount figures. What I did was keep the same column name from both my first table/view and the excel spreadsheet and did an association under the data manager and that fixed my problem.