Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Read about Qlik’s Response to COVID-19 Read the Letter, Join the Group.
Highlighted
New Contributor II

max expression

Using a straight chart with the dimension of meter number.
The expression is =NUM(SUM({$< DATE = {"2018-01*}>}Data),'# ##0') which gives me the sum of consumption for the month of january, data is hourly values.
I would like to add three more expressions to show me the top three values for current month.
To get the max I use =max(Data), =max(Data,2), =max(Data,3) but cant figure out how to add month to the max expression.
The final result is to see a twelve months with top 3 three hourly consumptions and the total of the month.

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: max expression

Max() and sum() are both aggregation functions where SET could be used.
Try adding your set
{$< DATE = {"2018-01*}>}
into your max expressions.
Like:
= MAX( {$< DATE = {"2018-01*}>} Data,2)
Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

2 Replies
Highlighted
Partner
Partner

Re: max expression

Max() and sum() are both aggregation functions where SET could be used.
Try adding your set
{$< DATE = {"2018-01*}>}
into your max expressions.
Like:
= MAX( {$< DATE = {"2018-01*}>} Data,2)
Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

Highlighted
New Contributor II

Re: max expression

Worked, thanks!