Skip to main content

I need some help this morning creating a calculated field. What I am trying to accomplish may be simple, I am just not able to get it to work properly.

 

1.) My Tableau worksheet data is currently structured in the following format.

Need Help With A Calculated Field To Show Volume Goals By Quarter

 

2.) The field labeled "2020 Volume Goal" is currently a formula that reads "SUM([Quantity])-SUM([Quantity]*1.14)" because that is how we calculated it in 2019.

 

3.) We are switching things up in 2020 and are wanting to hard code the quarterly goals to 11,700,000 for Q1 2020, 17,423,352 for Q2 2020, 15,644,149 for Q3 2020, and 22,522,571 for Q4 2020. 67,290,072 total for all of 2020.

 

4.) How would I structure the formula in the "2020 Volume Goal" field to accommodate this?

6 answers
  1. Jan 28, 2020, 1:59 PM

    Hello Keith,

     

    You can accomplish this with the following calculation.

     

    case DATEPART('quarter', [Order Date])

     

    when 1 then 11000

    when 2 then 15000

    when 3 then 18000

    when 4 then 20000

    END

     

    See the attached workbook. Hope this helps!

     

    Please mark this answer as correct or helpful if it helps solve your question.

     

    Robert Breen
0/9000