Depends on the format of your data. Do you have the sub totals precalculated in your data source itself? If you do, then that'll be easy to use, because you can just add in some padding for when the field is not a subtotal.
If you don't have the subtotals in there, then you could create separate worksheets and then combine it together in a dashboard. The final way would be to use something like tableau prep and union the data to itself and create the the subtotals in for the data source.
I would recommend looking into alternative methods to represent your data above though.
I am very new to tableau. i am just trying out things here. i took the data from the attached image itself and want to create the same in tableau. can you please tell mme how to add padding and achieve the visualizatin same as the image.
Please could you attach the data to this thread so that we can work with it.
Yes please could you attach the data itself rather than the image.
Create calculation as
if INDEX()=1 then attr([Sub Category]) else ' '
if INDEX() >= 2 then attr([Sub Category])
else ' '
' ' + [Second]
Drag category and subcategory,final into row and add value into text. Select final compute using subcategory
Please mark this answer as correct or helpful to close the thread
BI, Aspire Systems (India) Pvt Ltd