1 Reply Latest reply on Mar 15, 2016 4:25 AM by Shawn Wallwork

    Calculated LOD

    Albert Suryadi

      Hi,

      I'm trying to build get a coloring difference. For example, by different state, if values of open orders > median then color it red.

       

      I tried using LOD, but it doesn't seem to work...Attached the tableau 9.2 workbook here.

       

      Any pointers?

       

      Thanks,

      Albert

        • 1. Re: Calculated LOD
          Shawn Wallwork

          Thanks for the workbook and the version number! It always helps. Here's the calc you're looking for:

           

          { EXCLUDE [City] :

          MEDIAN(  {FIXED [Country], [State], [City] : SUM([lod_cnt_open]) }  ) }

           

          Notice it's a LOD within an LOD. See attached.

           

          Oops, I forgot to set it up for color. Use this calc:

           

          SUM([lod_cnt_open]) >= MAX(

          { EXCLUDE [City] :

          MEDIAN(  {FIXED [Country], [State], [City] : SUM([lod_cnt_open]) }  ) } )

           

          And drop it on the color shelf.

           

          --Shawn