Conditional statement based on string values ?

Answered

Comments

14 comments

  • Avatar
    Katie Garrison

    Hi Ankit,

    Currently front end IF and CASE statements work only on numerical numbers (not strings as you are trying to do). We are planning to add additional functionalities in future versions. Please see our documentation on the subject: Conditional Statements

    Also, feel free to submit your idea in our Ideas Forum, where it can gain traction through community input and upvoting.

    3
    Comment actions Permalink
  • Avatar
    Delsaran Bigglesworth

    Any up date on this feature?

    2
    Comment actions Permalink
  • Avatar
    David Bauernschmidt

    Any update?

    0
    Comment actions Permalink
  • Avatar
    Crystal Mosley

    I'd like an update on this one as well. It's killing me. :)

    1
    Comment actions Permalink
  • Avatar
    Anthony Nater

    same here.  any update?

    0
    Comment actions Permalink
  • Avatar
    Sandy Ward

    ditto - this would be very helpful!

    1
    Comment actions Permalink
  • Avatar
    Tim Kessler

    Any update on this?  

    1
    Comment actions Permalink
  • Avatar
    Angelina Karsa

    any updates- as this is a very useful functionality

     

    Thanks

    0
    Comment actions Permalink
  • Avatar
    David Hertzberg

    How to prioritize this ???

    David

    1
    Comment actions Permalink
  • Avatar
    Ido Darnell

    Hi All,

    Just a thought here, given that CASE/WHEN statements within widget formulas aren't supported yet for strings, one can allocate a unique INT value for each of the different string values within the EC table, by adding a new column, then using the RANK() function, this way each string will be allocated it's own unique INT value, and then apply the CASE/WHEN statement on that.

    Assuming the value of 'India' receives the INT of 17 then:

    If( [Country_INT] =17 , [Value] , NULL )

    OR

    CASE

    WHEN [Country_INT] =17 THEN [Value]

    ELSE NULL

    END

     

    LMK if I can further clarify

    Ido

    QBeeQ.pl

    0
    Comment actions Permalink
  • Avatar
    Alex Lin

    Any update? Thanks!

    0
    Comment actions Permalink
  • Avatar
    Cheri Helgens

    Katie Garrison - is there an update on this functionality yet? 

    1
    Comment actions Permalink
  • Avatar
    Hamza Jap-Tjong

    I struggle with this aswell sometimes. However I use this workaround (not always applicable)

    case 

    when (COUNT([ID]), [COUNTRY]) >0 then 5 else 0 end

     

    You can copy the when statement multiple times and filter the country field each time

    0
    Comment actions Permalink
  • Avatar
    Ido Darnell

    Hi All, just reposting my previous comment from above, as I see there's some interest on this, this solution is working for us:

    Just a thought here, given that CASE/WHEN statements within widget formulas aren't supported yet for strings, one can allocate a unique INT value for each of the different string values within the EC table, by adding a new column, then using the RANK() function, this way each string will be allocated it's own unique INT value, and then apply the CASE/WHEN statement on that.

    Assuming the value of 'India' receives the INT of 17 then:

    If( [Country_INT] =17 , [Value] , NULL )

    OR

    CASE

    WHEN [Country_INT] =17 THEN [Value]

    ELSE NULL

    END

     

    LMK if I can further clarify

    Ido

    ido.darnell@qbeeq.pl

    QBeeQ.pl

    Sisense Partner of the Year 2019!

    0
    Comment actions Permalink

Please sign in to leave a comment.