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: 
Not applicable

Sum of a field based on two unique fields.

Hi all,

Consider the following:

INPUT
StoreBuyerDeptUnit RetailStore RetailUnit Sales
3145Marry5526514
3146Marry55265510
3145Marry55265518
3145Marry5527853000
3147Marry552785428
OUTPUT
BuyerDeptUnit RetailStore RetailUnit Sales
Marry5526514
Marry55265528
Marry5527853428

On two unique fields Unit Retail and Store Retail calculate the Unit Sales sum.

Ex. Row 2 and 3 are identical when considering Unit Retail and Store Retail, there fore the total for this combination 5 and 5 should be 28 (10 + 18) and so on.

One idea was to create unique field for each row using "UnitRetail - StoreRetail" and store it along with the Unit Sales. Then in the table display unique entries for "UnitRetail - StoreRetail" along with sum(UnitSales).

Does anyone have a better idea for this issue?

Best regards,

T

1 Solution

Accepted Solutions
IAMDV
Master II
Master II

Hi T,

Please find attached QV document. Please look at the dimension tab and I have used calculated dimension.

I hope this helps!

Cheers - DV

View solution in original post

4 Replies
IAMDV
Master II
Master II

Hi T,

Have you considered using the calculated dimension on UnitRetail and StoreRetail? This is kind of similar technique as you thought but you don't have to create additional field.

I mean something like this in your dimension : [Unit Retail] & [Store Retail]

And you can change the name of the calculated dimension.

I hope this helps!

Good luck!

Cheers - DV

Not applicable
Author

Hi,

Can you please elaborate further. I am somewhat of a noob to Qlikview.

Thank you,

T

IAMDV
Master II
Master II

Hi T,

Please find attached QV document. Please look at the dimension tab and I have used calculated dimension.

I hope this helps!

Cheers - DV

Not applicable
Author

Thank you for the response. I will attempt to use the same logic and provide you feedback.

Thanks,

T