Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
capriconuser
Creator
Creator

Expression on the bases of filters

i have this formula 

 

net_pre - tax_prem

and these filters

code in ('12','13,'16','90') and type in ('abc','def','xyz') and type2 in ('general)

 

now i want to create expression using formula and filters.. how i do that .. 

7 Replies
Claudiu_Anghelescu
Specialist
Specialist

sum( {<code={'12','13,'16','90'}, type={'abc','def','xyz'}, type2={'general'}>} net_pre)
-
sum( {<code={'12','13,'16','90'}, type={'abc','def','xyz'}, type2={'general'}>} tax_prem)
To help community find solutions, please don't forget to mark as correct.
capriconuser
Creator
Creator
Author

one more thing please i have this condition also 

 

(A.Code Is Null Or (A.Code Is Not Null And A.MClass Is Null))

 

how to modify in the answer you provided .. 

 

sum( {<code={'12','13,'16','90'}, type={'abc','def','xyz'}, type2={'general'}>} net_pre)
-
sum( {<code={'12','13,'16','90'}, type={'abc','def','xyz'}, type2={'general'}>} tax_prem)

capriconuser
Creator
Creator
Author

any help please

Claudiu_Anghelescu
Specialist
Specialist

This condition should be added to the expression above?
(A.Code Is Null Or (A.Code Is Not Null And A.MClass Is Null))

Or you need a new expression but using this condition?
To help community find solutions, please don't forget to mark as correct.
Claudiu_Anghelescu
Specialist
Specialist

If you need a new expression try this:

sum({<A.Code={''} + (A.Code={''}, A.MClass={''})>} net_pre)
-
sum({<A.Code={''} + (A.Code={''}, A.MClass={''})>} tax_prem)

To help community find solutions, please don't forget to mark as correct.
capriconuser
Creator
Creator
Author

why + sign here ? because in this expression
A.Code Is Null Or (A.Code Is Not Null And A.MClass Is Null)

there is OR
Claudiu_Anghelescu
Specialist
Specialist

In Set Expression in QlikView, the sign + is equal ti OR
To help community find solutions, please don't forget to mark as correct.