Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Aggr with call Function

Hi,

I have a diagram where I use Time(class(MinStartTime, '00:15:00')) as an Dimension and the function is count(ID). Everything works. But know I need an easy KPI which gives me back the min count of ID´s in 15 minutes Intervals. But when I write down the expression

min(aggr(count(ID), Time(class(MinStartTime, '00:15:00')), Datum))

the Kpi gives back only -

Why?

Where is the mistake?

Thank you

1 Solution

Accepted Solutions
MVP
MVP

Re: Aggr with call Function

You can't use calculated dimensions as an aggr() function dimension. In your case, I think it would be best to create a field in the data model

LOAD

     Time(class(MinStartTime, '00:15:00'))  as MinStartTimeClass,

     ...

and use this field in the chart as well as the aggr() dimension.

5 Replies

Re: Aggr with call Function

I don't think Aggr can take calculated dimensions -> min(aggr(count(ID), Time(class(MinStartTime, '00:15:00')), Datum)) and secondly do you want a single value in your KPI box or multiple values???

MVP
MVP

Re: Aggr with call Function

You can't use calculated dimensions as an aggr() function dimension. In your case, I think it would be best to create a field in the data model

LOAD

     Time(class(MinStartTime, '00:15:00'))  as MinStartTimeClass,

     ...

and use this field in the chart as well as the aggr() dimension.

Re: Aggr with call Function

The aggregation fields must be dimension fields, that is you cannot use an expression.

To be clear, try to use the expression Time(class(MinStartTime, '00:15:00')) as a dimension an see the result.

let me know

Not applicable

Re: Aggr with call Function

Only a single value... The result for the expression Min... must be 3!

And there is no possibilty to become this result?

Re: Aggr with call Function

Like Stefan mentioned below, calculate the dimension in the script and then use it in your aggregate function.

Community Browser