Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum part of a row in pivot table

Hi , i'm new to QV but i'm trying my best.

In my example i need to create 2 new columns that would sum the expressions "Local Amount" and "Remmitance Amount".

Is that possible and if yes, what is the syntax?

1 Solution

Accepted Solutions
Not applicable
Author

Try this:

=sum({<merchants={'CBMS','CBMS-PayPal'}>}[Local Amount])+

sum({<merchants={'CBMS','CBMS-PayPal'}>}[Remmitance Amount])

View solution in original post

5 Replies
yasus
Contributor III
Contributor III

A simple "+"-operation should work

=sum([Local Amount])+sum([Remmitance Amount])

Not applicable
Author

Thanks Gregor but it seems that i didn't explain myself correct.

I need to sum in a new column (in my example) the [Locale Amount] (Expression)of CBMS and CBMS-PayPal which are diffrent merchants(Dimention). the same thing i need to do to the [Remmitance Amount]

I actually sum(Locale Amount] in its dimention anyway.

Thanks,

Avishay

Not applicable
Author

Try this:

=sum({<merchants={'CBMS','CBMS-PayPal'}>}[Local Amount])+

sum({<merchants={'CBMS','CBMS-PayPal'}>}[Remmitance Amount])

Not applicable
Author

Thanks you very much, it helps.

One more thing. CBMS and CBMS-PayPal can be anything else from the DB which means that the report don't know the merchant names.

Is there any generic formula for this?

Not applicable
Author

Try this:

=sum({<merchants={'*'}>}[Local Amount])+

sum({<merchants={'*'}>}[Remmitance Amount])

This will Consider all the merchants from the database.