Conditional statement based on string values ?

Answered

Comments

20 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.

    2
    Comment actions Permalink
  • Avatar
    Delsaran Bigglesworth

    Any up date on this feature?

    3
    Comment actions Permalink
  • Avatar
    David Bauernschmidt

    Any update?

    1
    Comment actions Permalink
  • Avatar
    Crystal Mosley

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

    2
    Comment actions Permalink
  • Avatar
    Anthony Nater

    same here.  any update?

    1
    Comment actions Permalink
  • Avatar
    Sandy Ward

    ditto - this would be very helpful!

    2
    Comment actions Permalink
  • Avatar
    Tim Kessler

    Any update on this?  

    2
    Comment actions Permalink
  • Avatar
    Angelina Karsa

    any updates- as this is a very useful functionality

     

    Thanks

    1
    Comment actions Permalink
  • Avatar
    David Hertzberg

    How to prioritize this ???

    David

    2
    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

    1
    Comment actions Permalink
  • Avatar
    Alex Lin

    Any update? Thanks!

    1
    Comment actions Permalink
  • Avatar
    Cheri Helgens

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

    3
    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!

    1
    Comment actions Permalink
  • Avatar
    David Peterson

    wow, issue is still outstanding since 2018.... glad. to see sisense product management really cares about the community.

    7
    Comment actions Permalink
  • Avatar
    Lucas Matter

    Hello there!

    We hope we can see this basic feature soon. Do we have any answer? 

    1
    Comment actions Permalink
  • Avatar
    Eshwar Sankar

    I would think this is a basic feature. I'm also trying to do something as simple as 

    if(Variable A > Variable B, 1,0) in the dashboard. Any update on this feature?

    1
    Comment actions Permalink
  • Avatar
    David Pitak

    Woud love to see an update on this. Converting some Tableau dashboards into our Sisense environment and missing this basic functionality is causing some extreme pain.

    1
    Comment actions Permalink
  • Avatar
    Kevin Matthews

    Would love to see this feature!

    0
    Comment actions Permalink
  • Avatar
    Bruce Jones

    Agree that this would be valuable.  Just spent an hour on this and finally found this thread.  This seems like a pretty easy feature to implement.  Would make a lot of things easier.  

    Sisense team - thanks in advance for giving this some consideration. 

    0
    Comment actions Permalink

Please sign in to leave a comment.