Forum Discussion

Chanise89's avatar
Chanise89
Helper I
3 years ago
Solved

Custom output based on table values

I need help with this one.

I have a requirement that says if a "User ID" has data in the "Tableau Report" column then return "Approved" 

If it doesnt have data then return "Not Approved"

 

I seemed to have figured out the "Not Approved' part but for some reason, I can't get "Approved" figured out.

Please Help

 

This is my DAX

2Box Title = SWITCH(
    TRUE(),
    SELECTEDVALUE(MetricInsights[User ID]) = VALUES('tableau_groups'[Tableau Report]),"Approved","Not Approved")
 

 

  • Hello Chanise89 ,

    Please note you are varifying with two different columns if you want to verify like that then you may have to create count of tableau report column or you should have userID in tableau report table as well otherwise it is like you will be comparing apples with oranges. 

     

    If you want to proceed with count then create a new column like 
    Count of Tableau Report = COUNTA(Tableau Report Columns)

    Then write your measure 

    2Box Title = If(Count of Tableau Report = Blank(),"Not Approved","Approved")

     

    If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

2 Replies

  • Hello Chanise89 ,

    Please note you are varifying with two different columns if you want to verify like that then you may have to create count of tableau report column or you should have userID in tableau report table as well otherwise it is like you will be comparing apples with oranges. 

     

    If you want to proceed with count then create a new column like 
    Count of Tableau Report = COUNTA(Tableau Report Columns)

    Then write your measure 

    2Box Title = If(Count of Tableau Report = Blank(),"Not Approved","Approved")

     

    If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

    • Chanise89's avatar
      Chanise89
      Helper I

      Thank you so much! This is exactly what I needed