Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a somewhat bizarre problem: The total is not correct. I have two separate payments of 400 each. the total shows me 400 instead of 800. I added a rowno () field to be sure that the two lines are very distinct.
Anyone know how to fix this?
In the settings for this column there is a "Totals function" drop-down. Select Sum.
I assume that the rowno that you created is not in the same table as the Payment amount that you are using in your sum expression.
Consider this script. The total amout is 400 not 800, and the 400 is associated to both the two detail rows.
Payment:
LOAD * inline [
FACT_NUM, P..., Payment Date, Payment amount
26000005165, BNS, 08/03/2017, 400
];
Payment_row:
LOAD * inline [
FACT_NUM, PMT_ROWNO, Item
26000005165, 1087898, Item A
26000005165, 1087899, Item B];
But if you still want to display this as 800 then you should as @Ivan_Bozov suggested, let your measure total aggregation to be sum or rows and not sum total.
Hi, thanks for answerinf.
Ok it works with straitch table but when i use a set analysis i still have the same problem (i've created table just to explain the problem).
Thanks in advance
hi,
Thanks for answering.
the rowno is in the same table. It's a payment table with a few milons of rows. I have this problem with only 13 payments and i can't find the reason.
Then I assume, and this is also what @Vegar suggested, that this payment of 400 is associated to multiple fields from another table, e.g. item description. Try removing all columns from the table one by one to see what causes the duplicate (only leave FACT_NUM and Payment Amount).
Also, did you create the RowNo() line in the straight table or is it part of the database?
Are all fields in the table and the field used for creating the calculation from the same single source table in the data model? Please double check.
Yes it's the same table and the the rowno is added on the load.
I think you understand my problem inside out. In fact, I don't have a double payment but a duplicate payment. There are two separate payments in the database. the problem is that only one payment is recorded when I use a set analysis as if I used "distinct".
The good amound in the database for this exemple is 3.085,18 but when i use set analysis or just simple sum i got 2.685,18 so the difference is 400.