Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
Not applicable

EXPRESSION HELP PLEASE

=IF(GetSelectedCount(LuCurrencyType3) > 0,

sum(IF(wildmatch([Type],'*Book*')=1,[Amount ]*Factors3)/Factors3),

sum(IF(wildmatch([Type],'*Book*')=1,[Amount ]*Factors3)))

Is there anything wrong in the above expression.

Below expression is working fine but when I add If to filter out amount for book it is not working.Is there any other way to write the above expression?

=IF(GetSelectedCount(LuCurrencyType3) > 0,

sum([Expense]*Factors)/[Factors3],

sum([Expense]*Factors))

1 Solution

Accepted Solutions

Re: EXPRESSION HELP PLEASE

May be this:

=IF(GetSelectedCount(LuCurrencyType3) > 0,

sum(IF(wildmatch([Type],'*Book*')=-1,[Amount ]*Factors3)/Factors3),

sum(IF(wildmatch([Type],'*Book*')=-1,[Amount ]*Factors3)))

or


=IF(GetSelectedCount(LuCurrencyType3) > 0,

sum({<Type = {'*Book*'}>} [Amount ]*Factors3)/Factors3),

sum({<Type = {'*Book*'}>}[Amount ]*Factors3)))

UPDATE: I would suggest using the set analysis method rather than if statement (2nd expression above)

4 Replies

Re: EXPRESSION HELP PLEASE

May be this:

=IF(GetSelectedCount(LuCurrencyType3) > 0,

sum(IF(wildmatch([Type],'*Book*')=-1,[Amount ]*Factors3)/Factors3),

sum(IF(wildmatch([Type],'*Book*')=-1,[Amount ]*Factors3)))

or


=IF(GetSelectedCount(LuCurrencyType3) > 0,

sum({<Type = {'*Book*'}>} [Amount ]*Factors3)/Factors3),

sum({<Type = {'*Book*'}>}[Amount ]*Factors3)))

UPDATE: I would suggest using the set analysis method rather than if statement (2nd expression above)

cesaraccardi
Valued Contributor

Re: EXPRESSION HELP PLEASE

Hi,

Yes you could use set analysis.

=IF(GetSelectedCount(LuCurrencyType3) > 0,

sum({$<Type={'*Book*'}>} [Expense]*Factors)/[Factors3],

sum({$<Type={'*Book*'}>} [Expense]*Factors))

Not applicable

Re: EXPRESSION HELP PLEASE

Thank to you as always !

Re: EXPRESSION HELP PLEASE

No problem