Hi all, I've attached an example excel file. I need to calculate the % sales of each product in the "Product Name" column based on total sales which are in the "Sales" column.

I have included a pivot table showing how the % breaks down. The data file contains a snapshot for week 15 and year 2018, but in the database I'm using, all weeks and years are present so would I be able to filter on week/year in the resulting tableau workbook?

put these two fields in the column and row then right click on SUM(Sales) then follow these steps

The data will be shown like this:

And yes week number and the Year number can be used as the filter.

You can use them directly or first by changing the data type of Year and Week number to "Date" and then use them as filter by Right clicking and then show as filter and choosing Year and Week number respectively.

Hi Jim thanks for your input I tried that but it didn't give me the expected result. I was actually doing this to populate a waffle chart example I saw on LinkedIn but when I changed to my database it wouldn't display the correct percentage. It's currently fixed at 10%.

I have attached the workbook here which includes a table showing the expected percentages for each product name.

When the filter is set to Standard the waffle chart should display (both graphically and numerically) 54%.

I appreciate you may not be familiar with this type of chart but I'm hoping that either you or Lovepreet above can help me out as it's a nice Viz to use.

Apologies Jim, I was a bit tight on time when I initially posted and was hoping I could have found a fix by simply attaching the excel data. I had assumed that your solution and that from Lovepreet could have been easily applied to this waffle chart example. I'm now attaching the packaged workbook together with the 2 data files.

Anyone please? This has been bugging me and I'm not sure if it's down to an issue connecting with MC Access. I have tried various SUM and TOTAL calculations. The % shows correctly in a table but not on the waffle chart. Strange.