5 Replies Latest reply on Jul 19, 2012 3:55 AM by vecsoftware

    Transforming a SQL statement to a Tableau formula



      I want to apply a specific filter to one of my variables (Filter > Condition > By Formula) but do not know how to even start.

      In SQL, it would look like that

      SELECT A FROM table1 WHERE A IN (SELECT DISTINCT A FROM table1 WHERE B IN ("some","static","values"))


      So, basically, Tableau should display every A where there is at least one A having B with one of the specified values.


      As I understood, I added A as a filter to Tableau and need a conditional expression, created by a Tableau formula.

      My problem is, that I am missing the WHERE, IN and DISTINCT in Tableau so I am not quite sure how I should even start with this formula.


      Furthermore, the filter should later be a TRUE or FALSE. So, if TRUE, the formula above will filter the results, if FALSE, the filter should be ignored.


      Maybe you can give me a hint if and if yes, how I can realize this formula filter in Tableau.


      Thank you very much,