Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody.
My script is
LOAD DEVICE,
MAX(`ENERGY`) AS MAX_MONTH,
MIN(`ENERGY`) AS MIN_MONTH,
Month(DATETIME) AS MONTH,
Year(DATETIME) AS YEAR,
RESIDENT DATA
GROUP BY IDPARK,IDDEVICE,Month(DATETIME),Year(DATETIME);
I need the SUM of (MAX_MONTH-MIN_MONTH) for each DEVICE in the current month.
I create a graph, put as Dimension : MakeDate(Year(now()),Month(now())
and the expression : sum(MAX_MONTH - MIN_MONTH)
but doesn't work...any help ?
The problem is linked to the dimension because i already used the expression in another graph "month by month" and works
Hi,
You can try the following:
put DEVICE as dimension use sum({<YEAR={'$(=year(today()))'}, MONTH={'$(=month(today()))'}>} MAX_MONTH- MIN_MONTH) as EXPRESSION.
Regards,
Som
I need the total sum of the devices, not the sum of each device.
i wrote badly, my mistake.
In that case put YEAR and MONTH in dimension list and use the same expression mentioned in my previous post.