Hi All,
I need to calculate the Percentage increase / decrease from Month to month.
The example below is for March increase/decrease from February.
If my understanding is correct to calculate the increase the formula should be:
(March2020 - February2020)/February2020 e.g. (18 - 1)/1 = 17 (1700%)
and for decrease
(March2020 - February2020)/March2020 e.g (18 - 1)/18 = -17 (-1700%)
Code:
SELECT qry100_March2020.What, qry100_February2020.February2020, qry100_March2020.March2020,
IIf([March2020]-[February2020]<0 Or [March2020]-[February2020]>0, ([March2020]-[February2020])/[February2020], ([March2020]-[February2020])/[March2020]) AS PercChange
FROM qry100_March2020 LEFT JOIN qry100_February2020 ON qry100_March2020.What = qry100_February2020.What
ORDER BY ([March2020]-[February2020])/[February2020] DESC;
Hope this makes sense.
Any help appreciated.
Cheers