Remi COURTEY Posted September 23, 2020 Share Posted September 23, 2020 Hello Spotfire Experts, For one of my client, I have to calculate the evolution over 2 years. It works perfectly in a barchart with the native Difference function (sum([X1]) THEN [Value] / First([Value]) Over (NavigatePeriod([Axis.X],"Year",-1))). But ly client wants to have it into a text area... (a global % evolution). But the difference function is not working in a Calculated value because Spotfire don't find the Axis.X (its' normal). So I tried to write directly the date field, but it's still not working... (sum([X1]) THEN [Value] / First([Value]) Over (NavigatePeriod([Date],"Year",-1)) Do you already have this issue KR Rmi Link to comment Share on other sites More sharing options...
Fabian Duerr Posted September 24, 2020 Share Posted September 24, 2020 Please create a year column [Year] = Year([Date]) in your data table and use the following in your calculated value: First(If([Year] = 2020, Sum([Value]))) / First(If([Year] = 2019, Sum([Value])))Adjust this to your needs. The years 2020 and 2019 could be user inputs as well. Just work with doc properties to be more flexible. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now