Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
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))

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

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)

View solution in original post

4 Replies
sunny_talwar
MVP
MVP

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
Specialist
Specialist

Hi,

Yes you could use set analysis.

=IF(GetSelectedCount(LuCurrencyType3) > 0,

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

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

Not applicable
Author

Thank to you as always !

sunny_talwar
MVP
MVP

No problem