Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sanity check with If and aggr

Hi!

I'm doing a sanity check so that an office only is connected to one region. To do this in a straight table is no problem. CLEARINGNUMMER as dimension and an expression aggr(count(DISTINCT Region), CLEARINGNUMMER) .

But now I would like to have a happy smiley when the data is ok and a sad when it's not. So to check this I use an If-statement. The problem is that I have to select all CLEARINGNUMMER for it to work. Is there a way of adding the dimension in the If-statement?

 

='qmem://<builtin>/Smiley'&

if(aggr(count( DISTINCT Region), CLEARINGNUMMER

)=1,1,3)&'_Y.png'

Rgds

thomas

1 Solution

Accepted Solutions
danielrozental
Master II
Master II

  

Try something like

='qmem://<builtin>/Smiley'&

if(sum(aggr(if(count( DISTINCT Region)>1,1), CLEARINGNUMMER

))=0,1,3)&'_Y.png'

View solution in original post

1 Reply
danielrozental
Master II
Master II

  

Try something like

='qmem://<builtin>/Smiley'&

if(sum(aggr(if(count( DISTINCT Region)>1,1), CLEARINGNUMMER

))=0,1,3)&'_Y.png'