2 Replies Latest reply on Mar 28, 2018 8:40 AM by Dave Dixon

# "Difference from first" table calc in 9.3?

This time I have a running calc in a viz giving me the % difference from the previous FY (simple bar chart of counts).  Figured that was the requirement, but I am told now that the target % difference for each FY is intended to be calculated from the baseline year, which is the first bar.

Meaning I need Bar 1, then [Bar 2 and its % diff from bar 1], then [Bar 3 and its % diff from bar 1], and [Bar 4 and % diff from bar 1].

I see newer versions of Tableau apparently have the ability to just let you pick what you want the running "Difference From" to reference.

How do I do it in 9.3?   I'm told that a 10 upgrade is in the works but we don't know how many months that will actually take.

• ###### 1. Re: "Difference from first" table calc in 9.3?

Hi Dave,

Looks like you will need to write the table calc yourself.  You will uses first to identify the first partition in your table.  The syntax would be like below.  Let me know if you have any questions.

Regards,

Ivan

(ZN(SUM([Sales])) - LOOKUP(ZN(SUM([Sales])), FIRST())) / ABS(LOOKUP(ZN(SUM([Sales])), FIRST()))

1 of 1 people found this helpful
• ###### 2. Re: "Difference from first" table calc in 9.3?

DOH - actually, when I went in to do this with a new table calc, it gave me the difference from first option!   I guess you just can't do it in an edit to an existing one.

1 of 1 people found this helpful