Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm creating a dashboard and I inject my data via SQL that has 2 columns that are used in this case;
Date | Quantity
01.01.2024 | 1
01.05.2024 | 9
Now the difference is +8 but I don't know how to proceed with that.
Max(Quantity) - Min(Quantity) -- i know it's something along these lines 😞
Try this:
If(Isnull(Above(quantity)), quantity, quantity - Above(quantity))
Something to consider is that your data should probably be sorted (It seems your data is sorted on date).
I tried this data:
load
date,
quantity
Inline
[date, quantity
01.01.2024 , 1
01.05.2024 , 9
01.10.2024 , 15
]
and got the following result:
date | Sum(quantity) | Sum difference |
Totals | 25 | - |
01.01.2024 | 1 | 1 |
01.05.2024 | 9 | 8 |
01.10.2024 | 15 | 6 |
Hope this helps.