Announcements
MAINTENANCE ALERT: Dec. 12th starting 9 AM CET. Community will be read-only. GET DETAILS
cancel
Showing results for
Did you mean:
Contributor II

## Sum by 2 Criteria

Hi,

I want to merge 2 formulas into one in Qlikview expression.

Formula 1 : =Sum({\$<Item_Type = {'N'} >}  [Total Sales])

Formula 2 : = Sum ({\$<REFERENCE= p({1< [Product Code] = {'0000048565660'}>} REFERENCE) >} [Total Sales])

Thk very much.

Parakorn.T

Labels (1)
• ### General Question

7 Replies
Partner - Creator III
Contributor II
Author

Hi Sir

Thk for link, I try to learn and adapt to my formulas but criteria 2 does not work, the result is still equal at last.

I don't know what is wrong.

A New Formula

=Sum({\$<Item_Type = {'N'} >+\$<REFERENCE= p({1< [Product Code] = {'0000048565660'}>} REFERENCE) >} [Total Sales])

Partner - Creator III

try this -

Sum({\$<Item_Type = {'N'} ,REFERENCE= p({1< [Product Code] = {'0000048565660'}>} REFERENCE) >} [Total Sales])

Partner - Champion

Hi @parakorn ,

What is your actual result and the expected one ?

What is the business logic behind the expression ? what are you trying to achieve ?

Best Regards

Contributor II
Author

Thk you sir

I received 2 formulas from QV report of my company,

One Sumif by type of sales 'N'

and Two Sum-only tickets had item '0000048565660' in the lists then

I want to Sumif by type 'N' and the only ticket had item '0000048565660'

Sorry if you don't understand, I'm not good at Eng languages.

Contributor II
Author

The result is still equal, I want to filter bills that had Item '0000048565660' and Item_Type = 'N' and sum that.

Partner - Creator III

@parakorn
It should be equal,
there is one formula with 2 conditions,
can you please send some examples for the input and the output that you expect?

Community Browser