Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Bobi
Partner - Contributor II
Partner - Contributor II

Set expression (whats wrong in my expression?)

Hi. I have a Set expression made of lot of IF-statements. 

This one works perfectly fine except that I got a lots of rows I previously succeded to eliminate from the table through a calculated dimension. These appear due to that I need to insert the condition Marketdata.organizations<10, 'too little data into the equation instead. I just want the rows who fulfill some of the conditions to be tagged as "too little data". Now I got a lot of unwanted rows tagged also and appearing in table.


Anyone that can help? Tried rewriting it but failing so far..

 

if(MarketData.Organizations<10 ,'Too little data',
if(measures='TTC',


if(getselectedcount([IPE])>=1 and getselectedcount([Country])>=1 and getselectedcount([MarketData.Family (Function)])>=1
and getselectedcount([MarketData.Function and Department (Job Family)])>=1 ,

(if ( Avg([TTC_1])-avg([MarketData.TTC]) >0,'Higher than market' ) ))

,
if(getselectedcount([IPE])>=1 and getselectedcount([Country])>=1 and getselectedcount([MarketData.Family (Function)])>=1
and getselectedcount([MarketData.Function and Department (Job Family)])>=1 ,

(if ( Avg([1])-avg(MarketData.ABS) >0,'Higher than market' ) )) ) )

 

Labels (2)
1 Reply
JordyWegman
Partner - Master
Partner - Master

Hi Bobi,

What are you doing in the middle and at the end? Because I don't know why you are using the parentheses there.

What happens if you use this:

if(MarketData.Organizations<10 ,'Too little data',
    
    if(measures='TTC',
       
       if(getselectedcount([IPE])>=1 and getselectedcount([Country])>=1 and getselectedcount([MarketData.Family (Function)])>=1 and getselectedcount([MarketData.Function and Department (Job Family)])>=1 ,

            if ( Avg([TTC_1])-avg([MarketData.TTC]) >0,'Higher than market', 

                if(getselectedcount([IPE])>=1 and getselectedcount([Country])>=1 and getselectedcount([MarketData.Family (Function)])>=1 and getselectedcount([MarketData.Function and Department (Job Family)])>=1 ,

                    if ( Avg([1])-avg(MarketData.ABS) >0,'Higher than market' ) 
                
                )
            ) 
        ) 
    )
)

Jordy

Climber

Work smarter, not harder