alner / qsSimpleKPI

Simple KPI component for Qlik Sense
58 stars 46 forks source link

Expressions with two dimensions in aggr function does not work as measure #33

Closed philipplozovoy closed 7 years ago

philipplozovoy commented 7 years ago

Hi. I have faced with an issue that Simple KPI don't calculate measure that has formula with two dimensional aggr function, like sum(aggr(sum(Amount),Dim1,Dim2). The result of using such expression in Simple KPI extension is null or nothing. While same expression works fine in standard KPI object.

Could somebody help me with this issue?

alner commented 7 years ago

It should work. QIX-engine calculates expressions. Could you please attach qlik sense file with such expression? Buy the way, sum(aggr(sum(Amount),Dim1,Dim2) has a bug. You haven't properly enclosed it with parentheses. It should be: sum(aggr(sum(Amount),Dim1,Dim2))

philipplozovoy commented 7 years ago

QlikSense demo app with this bug here (https://www.dropbox.com/s/oov2pl0r8tqe3uy/simpleKPItest.zip?dl=0) It looks like image I have realised that simpleKPI supports aggr function with multiple dimensions when there is no dimension in the extension.

alner commented 7 years ago

Problem is in synthetic dimension (ValueList). It will work if you specify e.g. Store as a dimension or remove dimension at all. Aggr function should contain at least one dimension used in the object. If you convert SimpleKPI into Table object you will get exactly the same result! image