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

How to write expression in Pivot table

Hi,

I need to get the values of Amount when

Amount>0 and Domain='RR' and Type in ('old',New') and ID=56432

here Amount,Domain,Type are from Sales table where ID is from Account table.

could anyone help me please how to write expression to get Amount.

Thanks.

13 Replies
MK_QSL
MVP
MVP

IF(SUM({<Domain = {‘RR’}>}, Type = {<’old’,’New’>, ID = {‘56432’}}Amount)>0, SUM({<Domain = {‘RR’}>}, Type = {<’old’,’New’>, ID = {‘56432’}}Amount))



Considering that there is a common filed between both table. may be ID or Account ID

Not applicable
Author

Thanks and when I am usin this it is showing error at

Type = {<’old’,’New’>,

is there anything I need to change?

MK_QSL
MVP
MVP

IF(SUM({<Domain = {‘RR’}, Type = {’old’,’New’}, ID = {‘56432’}>}Amount)>0, SUM({<Domain = {‘RR’}, Type = {’old’,’New’}, ID = {‘56432’}>}Amount))

Not applicable
Author

Thanks and still it is showing same error in the same place please help as I stucked here.

MK_QSL
MVP
MVP

what is your dimension? Can you upload sample data?

jcoggon
Partner - Contributor III
Partner - Contributor III

Hi Amelia,

You could also try SUM({<Amount = {">0"}, Domain = {"RR"}, Type = {"old","New"}, ID = {"56432"}>}Amount)

Not applicable
Author

the dimension is employee from Account table

Not applicable
Author

Thanks and hoe can I change if want to get Amount instaed of Sum(Amount) with same requirements.

Please could you send me the expression.

MK_QSL
MVP
MVP

This should work...!!!

IF(SUM({<Domain = {‘RR’}, Type = {’old’,’New’}, ID = {‘56432’}>}Amount)>0, SUM({<Domain = {‘RR’}, Type = {’old’,’New’}, ID = {‘56432’}>}Amount))