Skip to main content

Hi there,

 

I have a timeseries dataset of a measure that increases over time, such as:

 

YearMeasure20100201110020123002013300

 

I want to create a calculated field that will calculate the additions in each year. For example it would show 0, 100, 200, 0 for the four years above based on the change in "Measure" in each year.

 

Can someone help with how to create such a calculated field in Tableau?

 

Thanks!

Aaron

3 answers
  1. Jan 9, 2015, 11:01 PM

    Aaron:

     

    Create a calculated field with the formula below:

    if first() == 0

    then

        0

    else

        sum([Measure]) - lookup(sum([Measure]), -1)  

    end

     

    and this should get you what you are looking for.

     

    Aaron: Create a calculated field with the formula below:if first() == 0then 0else sum([Measure]) - lookup(sum([Measure]), -1) end and this should get you what you are looking for. ..

    ..kk

0/9000