Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
claudialet
Contributor III
Contributor III

How to enable condition on a filter ?

 Here is my expression on a column filter . It is a variable based filter level and has level 1 and level 4. 


if($(vFilter)=1 and ForeignFlag=1 , EntityNumber &'-'& EntityName ,

if($(vFilter)=4 and EntityTypeFlag=1, EntityNumber &'-'&  EnterpriseName))

 

i need the 2 flags to display certain types of entities at different levels. Because it is only specified for those 2 types when there are other entity types the report does not display any data.

How do I rewrite the condition so it shows data whether matching entity data is there or not ?  If the entity types match show that data if not show data for other types of entities 

3 Replies
lfetensini
Partner - Creator II
Partner - Creator II

Missing "Else" ?

 

If(
 $(vFilter)=1 and ForeignFlag=1,
 EntityNumber &'-'& EntityName,
 
 If(
 $(vFilter)=4 and EntityTypeFlag=1,
 EntityNumber &'-'& EnterpriseName,

 EntityNumber &'-'& EntityName  // <<< ELSE
))

Support your colleagues. Remember to "like" the answers that are helpful to you and flag as "solved" the one that helped you solve. Cheers.
Channa
Specialist III
Specialist III

if($(vFilter)=1 and ForeignFlag=1 , EntityNumber &'-'& EntityName ,

if($(vFilter)=4 and EntityTypeFlag=1, EntityNumber &'-'&  EnterpriseName,'0'))

 

if you wan to show different data write your else 

Channa
claudialet
Contributor III
Contributor III
Author

 Hi Channa,

So I have another conditional flag  :  StateFlag =0 

If ForeignFlag =1    show foreign values   or 

If StateFlag = 0   show  state values

 

How do I incorporate this into the expression with else statement ?

if($(vFilter)=1 and ForeignFlag=1 , EntityNumber &'-'& EntityName ,

if($(vFilter)=4 and EntityTypeFlag=1, EntityNumber &'-'&  EnterpriseName,))