Forum Discussion

PSRai's avatar
PSRai
Icon for Helper III rankHelper III
6 years ago
Solved

Calculating a measure

Hi I have created 2 measures that give me a MAX of a energy column and a MIN of a energy column by row by date. When I create a measure that is MAX enery - MIin energy, this works greate at row level but not at column level

 

THe total is showing the MAX and MIN of their columns rather than the SUM., how do I SUM the columns?

 

read_at (bins) Hours       MAX energy            MIN energy                        MAX - MIN

15/08/2019 00:00             16.9                        16.02977089                       0.87

15/08/2019 01:00             16.04                     16.03525022                       0

15/08/2019 02:00             16.04                     16.03630511                       0

15/08/2019 03:00             16.04                     16.03614189                       0

15/08/2019 04:00             16.04                     16.03598733                       0

15/08/2019 05:00             16.04                     16.03570133                       0

15/08/2019 06:00             16.85                     16.02784222                       0.82

15/08/2019 07:00             16.8                        16.02807111                       0.77

15/08/2019 08:00             16.04                     16.03281067                       0

15/08/2019 09:00             16.04                     16.03279333                       0

15/08/2019 10:00             16.04                     16.03314267                       0

15/08/2019 11:00             16.04                     16.03318667                       0

15/08/2019 12:00             16.04                     16.032692                            0

15/08/2019 13:00             16.04                     16.035632                            0

15/08/2019 14:00             16.04                     16.03573022                       0

15/08/2019 15:00             16.04                     16.035827                            0

15/08/2019 16:00             16.04                     16.035801                            0

15/08/2019 17:00             16.04                     16.03573022                       0

15/08/2019 18:00             16.04                     16.03589633                       0

15/08/2019 19:00             16.04                     16.03563633                       0

15/08/2019 20:00             16.04                     16.03597433                       0

15/08/2019 21:00             16.04                     16.03596133                       0

15/08/2019 22:00             16.04                     16.03327467                       0

15/08/2019 23:00             16.04                     16.03327733                       0

16/08/2019 00:00             16.04                     16.033476                            0.01

16/08/2019 01:00             16.04                     16.033304                            0

16/08/2019 02:00             16.04                     16.033116                            0

16/08/2019 03:00             16.04                     16.03305733                       0

16/08/2019 04:00             16.04                     16.03263867                       0

16/08/2019 05:00             18.12                     16.03273467                       2.08

16/08/2019 06:00             18.26                     16.69404533                       1.57

16/08/2019 07:00             16.95                     16.02757111                       0.92

16/08/2019 08:00             16.95                     16.02763556                       0.92

16/08/2019 09:00             16.92                     16.02776556                       0.89

16/08/2019 10:00             16.92                     16.02777556                       0.89

 

TOTAL                               18.26                     16.02757111                     2.232428889

 

IT SHOULD BE                   571.71                   561.821556                       9.888444

2 Replies