4 Replies Latest reply on Jul 5, 2018 7:39 AM by Patrick Cook

    total and subtotal on attribute fied

    David Marin


      I have a field that called  "Yearly Budget" , this field is defined as measure but i have truned it to ATTRIBUTE

      for some reason(look at the attched file) , after i have turned it to ATTRIBUTE i can't calucate the field's total and subtotal.

      is there any way to to this?

      I have attached a twbx file that represent what im tring to do


      Regrads David

        • 1. Re: total and subtotal on attribute fied
          Tom W

          You've actually changed it to a dimension.

          Drag it back into the measures pane so it becomes a measure again. Drag it onto the rows shelf, then right click it and select Discrete.

          • 2. Re: total and subtotal on attribute fied
            David Marin

            Hi Tom,


            Thanks for your response

            i did what you have suggested and im still not able to caluclate the Total for this field ("Yearly Budget"),

            The "Yearly Budget" is a measure now and he also descrete .

            Can you send me an update exaple file base on the twbx that i have uploaded in the origial message?




            • 3. Re: total and subtotal on attribute fied
              Tom W

              Hi David,

              I think I understand your problem better now. Tableau calculates grand totals for anything which displays on the marks card. In this instance you have SUM(EXP) as your measure on the marks card and you'll see the Grand Total is displaying as expected.

              Because you're showing the Yearly Budget on the rows shelf, Tableau isn't going to calculate and show the Grand Total.


              You might find some useful information in this reference library post - Why Your Grand Total or Subtotal Isn't Working as Expected which might help you get a workaround, but I don't know the straight up solution for you in this case.

              • 4. Re: total and subtotal on attribute fied
                Patrick Cook

                Hi David,


                Not sure if you are still having issues with this, as this post is almost two years old now.  However, I have recently come across the same types of issues with aggregating Attribute Measures and Dimensions. Please see the attached Tableau file. I wrote a calculation for the Running Sum of EXP. Which looks like RUNNING_SUM(SUM([EXP])). This is a work around, but it will give you the running total at least.


                Hope this helps!


                Patrick Cook