Is there a way to show % change between periods?

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

  • Hi all,

     

    Can anybody help @MattGo with their question?

    Thanks!

  • ilikenno
    ilikenno

    domo

    💎

    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: [email protected]
    Phone: 801-805-9505

  • @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?