1 Reply Latest reply on Dec 12, 2018 3:54 PM by Patrick A Van Der Hyde

    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?