Discussion board where members can get started with Qlik Sense.
We need to calculate and use in a line graph the difference, based on ID, of the prior year v. current year.
So far, we have 2 years but this will need to work generally. Naturally the first year 2015 would have no "difference" record. The subsequent years would.
We are calculating the ratio, currently, as a measure.
Is this all best done in the load script, or as a calculated measure?
Let's consider one row
Can you explain 3.57??
As per my understanding, from your query.
Create two variable :- vMax=Max(Year) & vPrev=$(vMax)-1
Put vMax into you first expression and vPrev in second expression with your needed measure, that would give you two lines in chart where you can see the difference in current & Previous year.