How to compare Value Columns

Hi,


Beginner to DOMO so excuse the question.


I've created a Pivot table with 2022 sales vs 2023 preorder sales by account and would like to add in a % difference column at the end that shows whether an account is up or down for 2023. How do i go about adding that?


Best Answer

Answers

  • @JackB116 I'd actually suggest changing your card from a Pivot Table to a Table chart type if you want to add calculations. You'd need to use beast modes for your 2022 and 2023 totals like this:

    sum(case when `Delivery Year` = '2022' then `GDP Net` else 0 end)
    

    Then your % difference calculation would look like this:

    (
    sum(case when `Delivery Year` = '2023' then `GDP Net` else 0 end) 
    - 
    sum(case when `Delivery Year` = '2022' then `GDP Net` else 0 end)
    ) / 
    sum(case when `Delivery Year` = '2022' then `GDP Net` else 0 end)
    
  • JackB116
    JackB116 Member
    Answer ✓

    Thank Michelle this has worked perfectly!