1 Reply Latest reply: Jan 3, 2013 8:51 AM by Daniel Rozental RSS

    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