Is there a way to show % change between periods?

MattGo
MattGo Member

I am pulling in sales data from NetSuite and grouping it by quarter. I would like to show the quarterly revenue in a vertical bar chart with the QoQ change % as symbols in the same chart. Any suggestions would be much appreciated. Thanks!

Comments

  • kshah008
    kshah008 Contributor

    Hi all,

     

    Can anybody help @MattGo with their question?

    Thanks!

  • Gimli
    Gimli Domo Employee

    Hello @MattGo

    We can utilize beastmodes to find this. 

    To find the current quarter we would use the following formula: 

    SUM(CASE
    WHEN QUARTER(`Date` ) = QUARTER(curdate())
    AND YEAR(`Date`) = YEAR(curdate())
    THEN `Value`
    End)

    To find the previous quarter we would use: 

    SUM(CASE
    WHEN QUARTER(`Date` ) = QUARTER(SUBDATE(curdate(), INTERVAL 1 QUARTER))
    AND YEAR(`Date`) = YEAR(SUBDATE(curdate(), INTERVAL 1 QUARTER))
    THEN `Value`
    End)

    To find the % change we would use the basic formula: 

    (Current - Previous) / Previous


    Using our formulas we created above, we can plug them in, in place of the words: 

    (
    SUM(CASE
    WHEN QUARTER(`Date` ) = QUARTER(curdate())
    AND YEAR(`Date`) = YEAR(curdate())
    THEN `Value`
    End)
    -
    SUM(CASE
    WHEN QUARTER(`Date` ) = QUARTER(SUBDATE(curdate(), INTERVAL 1 QUARTER))
    AND YEAR(`Date`) = YEAR(SUBDATE(curdate(), INTERVAL 1 QUARTER))
    THEN `Value`
    End)
    )
    /
    SUM(CASE
    WHEN QUARTER(`Date` ) = QUARTER(SUBDATE(curdate(), INTERVAL 1 QUARTER))
    AND YEAR(`Date`) = YEAR(SUBDATE(curdate(), INTERVAL 1 QUARTER))
    THEN `Value`
    End)

    Please keep in mind that the columns in blue need to be replaced with your column names. 

     

    If you have difficulty adding this to your card you can reach out to DOMO's support team. 
    Email: support@domo.com
    Phone: 801-805-9505

    **Say “Thanks" by clicking the thumbs up in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • jehat
    jehat Domo Employee

    @MattGo Please contact me directly via private message and reference case #02035435 if you need any more assistance on this issue.

  • Hi @ilikenno,

     

    How would you do the same for a year over year change. Would I just remove the "quarter" part of this formula?