0 Replies Latest reply on Nov 2, 2018 10:38 AM by Ailsa Zheng

    Tableau Cube Question: Using MDX to switch out dimensions based on what is selected in a parameter?

    Ailsa Zheng

      Hello all,

       

      I am working with a cube. Let's say my data set looks like this:

      OwnersPet TypePet NamePet ***
      JimDogFidoMale
      JimDogRufusMale
      AnnaCatTinkerbellFemale

       

      If this were a flattened table, I could have a parameter called "Slicer" with the calculation:

       

      Case [Slicer] when 'Name of Owner' then [Owners]

      when 'Type of Pet' then [Pet Type]

      when 'Name of Pet' then [Pet Name]

      when 'Pet ***' then [Pet ***]

       

      And then based on what I select in my parameter I could switch between which dimension I'm using. Anyone have any tips on how to do this in a cube with an MDX calculation?