5 Replies Latest reply on Oct 31, 2018 3:33 PM by Joe Oppelt

    Trying to return string using calculation with multiple variable in a dimension

    Janice Ip

      So I tried Case, IF() and IIF()  for the following

      Open to other calculation as long as I get to use the dimension filter and not a parameter

       

      CASE  [Type Of Visitor]

      WHEN 'Day Trippers' THEN "Day Trippers"

      WHEN  'Min 1 night Count' THEN "Min 1 night Stays"

      WHEN  'Total Count'  THEN "Total Count"

      WHEN  'Total Count' AND 'Day Trippers' THEN "Total Count and Day Trippers"

      When 'Total Count' AND  'Min 1 night Count' THEN "Total Count and Min 1 night Stays"

      When 'Day Trippers' AND 'Min 1 night Count' THEN "Min 1 night Stays and Day Trippers"

      When 'Total Count" AND   'Day Trippers' AND 'Min 1 night Count' THEN "Total Count, Min 1 night Stays and Day Trippers"

      End

       

      [Type of visitor] is a dimension

      I want to get when I click on the dimension filter

      such as EX.

      Total Count, Day Trippers, I should get a return "Total Count and Day Trippers"

      Total Count, Day Trippers, Min 1 night stay, I should get a return of  "Total Count, Min 1 night Stays and Day Trippers"

       

      I get the first 3 right but no matter what I do when I try to get right string when I select multiple variable, I get a separate out some like

      Ex. If I select Total Count and Day Trippers,

      instead of getting "Total Count and Day Trippers"  I get "Total count" "Day Trippers" Separately.