Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
svedesee
Contributor II
Contributor II

Fix a value

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

3 Replies
somenathroy
Creator III
Creator III

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

svedesee
Contributor II
Contributor II

I need the total sum of the devices, not the sum of each device.

i wrote badly, my mistake.

somenathroy
Creator III
Creator III

In that case put YEAR and MONTH in dimension list and use the same expression mentioned in my previous post.