3 Replies Latest reply on Jun 24, 2015 6:08 AM by Jonathan Drummey

    How do I sum a measure once for each dimension value?

    Brent Schebel

      I have a health care dataset that has the length of stay in days on each row for each patient ID. I have that table joined to a table which lists every doctor that established a relationship to said patient ID. Which is many Docs and Doc Relationships for each Pt ID. When I sum the length of stay its inflated and I dont want to always show each dimension on my views. I can use a blend of the two tables and it works but its blending on Pt ID which is a very granular dimension so the views take quite a while to render.

       

      Is there a way with Tableau v9 new LOD expressions that i can use to help me avoid blending or table calcs?

      Here is some sample data...

       

      HospitalPtIDRltnDocLOS
      Memorial1attdoc15
      Memorial1admdoc25
      Memorial2consdoc34
      Memorial2attdoc44
      Memorial2admdoc44
      Memorial2erdoc54
      Memorial3erdoc17
      Memorial3consdoc67
      Memorial3attdoc47

       

      So how do I get the correct average or sum of length of stay for Hospital Memorial?

      Average LOS would be (5 4 7)/3=5.33

      Sum of LOS should be (5 4 7)=16