Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to plot daily energy consumption change for 10 users in a line chart. Using below formula
(
aggr(sum(energy_consumption), date, user) -
above(aggr(sum(energy_consumption), date, user))
)/above(aggr(sum(energy_consumption), date, user))
Above formula when we use in Table it returns the correct value for the % change. But while using same formula in Line chart it populates incorrect values.
Eg -
date_col, user, % Change
01-10-2019, user1, 8.9
But in the line chart the % Change value is plotted at 9.5 instead of 8.9 for user1 on 01-10-2019
Properties set for Line chart
Data
Dimensions - date_column
Line - user
Include null - unchecked
May be adding outer aggregation like
Sum((aggr(sum(energy_consumption), date, user) - above(aggr(sum(energy_consumption), date, user)))/above(aggr(sum(energy_consumption), date, user)))