5 Replies Latest reply on Oct 16, 2018 11:58 AM by Tarun Singh Thakur

# Total of rows based on criteria

Hi All,

In Tableau, I am trying to calculate the row total based on year but I am not able to achieve it.

Below is sample data, I want to achieve Total(marked in yellow) for two years - 2017 and 2018. In Tableau, the Grand Total will give the total of complete row i.e. for Group A : 100+200+25+25+20+50 = 420. But, my interest is to get the total based on year i.e. for year 2017 and Group A, the total should be 100+25+20 = 145.

Please guide me. Thank you very much.

Best Regards,

Tarun

Message was edited by: Tarun Singh Thakur I have attached : 1. The extracted Tableau workbook 2. Tableau worksheet and the actual xlsx file. Please advise. Thank you.

• ###### 1. Re: Total of rows based on criteria

Attach the sample workbook with data so that people here can help you.

• ###### 2. Re: Total of rows based on criteria

Hi Tarun

Without seeing the workbook, as Ombir suggested, it is difficult to give good advice.

However, something like {FIXED [Year], [Group] : SUM()} will return the total per group, per year.

Regards

Stefan

• ###### 3. Re: Total of rows based on criteria

Hi Tarun,

Are you open for data transformation? structuring the data in a proper way would make it easy.

Thanks,

Soham

• ###### 4. Re: Total of rows based on criteria

Hi Tarun,

Self Union your data and using Table name column , create another this calc and you would get another element in your dimension.

Calc for new Dimension, Like This

IF Tablename="Sheet1" Then Your Dimension

ELSE "Total"

END

Now use it in the Columns and you will get what you are looking for.

Thanks

Deepak

If it Helps, Pl mark it Helpful and CORRECT to close Thread

• ###### 5. Re: Total of rows based on criteria

Hi,

I have attached the documents.

Please assist.

Thank you.