14 Replies Latest reply on Nov 8, 2018 10:49 AM by Carmen Torres

    How to dynamically change measure names with many values?

    Carmen Torres

      I'm new to Tableau and I'm trying to create a worksheet that allows the user to select an age group parameter which populates the appropriate age columns.  I created three age group folders; i.e., Basic, Geriatric, and Pediatric. 

       

      • The Basic folder consists of the following measures:  [00-04], [05-09], [10-14], [15-17], [18-20], [21-24], [25-34], [35-44], [45-54], [55-64], [65-74], [75-84], [85+].
      • The Geriatric Folder consists of one calculated field, [00-64 (G)] (computed as [00-04]+ [05-09]+ [10-14]+ [15-17]+ [18-20]+ [21-24]+ [25-34]+ [35-44]+ [45-54]+ [55-64]) and the three measures [65-74 (G)], [75-84 (G)], and [85+ (G)].
      • The Pediatric Folder which consists of the three measures [00-04 (P)], [05-09 (P)], [10-14 (P)], [15-17 (P)] and a calculated field [18+ (P)] (computed as [18-20]+ [21-24]+ [25-34]+ [35-44]+ [45-54]+ [55-64]+[65-74]+ [75-84]+ [85+])

       

      Note: the measures of Geriatric and Pediatric are duplicates of the Basic, but renamed.

       

      I created a parameter called "Age Group Parameter" which lists "Basic", "Geriatric" and "Pediatric".

       

      Now I'm trying to create a calculated field called "Age Group" that will dynamically replace the Measure Names with the appropriate folder's measures as follows:

       

      CASE [Age Group Parameter]

      WHEN "Basic" then <populate measure names with Basic folder measures>

      WHEN "Geriatric" then <populate measure names with Geriatric folder measure>

      WHEN "Pediatric" then <populate measure names with Pediatric folder measure>

      END

       

      At this point, I'm stuck.  I don't know how to proceed.  Can someone tell if this is possible or tell me the steps to proceed?