Skip to main content

Hello Tableau Community!

 

I am trying to Calculate the total quantity (units) across our different products month over month.

 

The calculation should be # of accounts x quantity listed. An account [Si Acct Nbr] can have multiple quantities [Si Qty] i.e. 1, 2, 5, etc.

 

In the example, for April 2023, our total should be 1+12=13, not 18+216=234

 

Calculation to Find Total Quantity Per MonthI've tried to use SUM [Si Qty], but that doesn't work. Does anyone have thoughts on what I should be doing instead?

 

Charlie

2 respostas
  1. 1 de mar. de 2024, 12:32

    @Charlie Mouy​ 

    Your data is repeated in the dataset so you when you are doing SUM(Si Qty) then it will give you an aggregate score.

    Please use the below calculation to get you expected output.

    SI QTY Calc:

    { FIXED [Year of Si Prd],[Quarter of Si Prd],[Month of Si Prd],[Si Acct Nbr]: SUM(

    { FIXED [Year of Si Prd],[Quarter of Si Prd],[Month of Si Prd],[Si Acct Nbr],[Si Qty]:AVG([Si Qty])}

    )}

    Please see attached screenshot.

    @Charlie Mouy​ Your data is repeated in the dataset so you when you are doing SUM(Si Qty) then it will give you an aggregate score.Please use the below calculation to get you expected output. 

    Please find attached workbook for your reference.

    If this correct answers your question, please "Upvote" and "Select as Best"

0/9000