Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set variable in expression

Hi,

consider the following:

1. KPI table containing KPI definition along with its definition:

KPI:

LOAD * INLINE [

    KPI nr,KPI, KPI_Formula

    1, Uren, sum(KPI_Value)

    2, Omzet, AVG(KPI_Value)

    3, Marge, sum(KPI_Value)

    4, Kosten, sum(KPI_Value)

    6, Gem. loon, AVG(KPI_Value)

    7, Gem. tarief, AVG(KPI_Value)

    8, Gem. leeftijd, AVG(KPI_Value)

    11, Responstijd, AVG(KPI_Value)

    16, Verblijfsduur, AVG(KPI_Value)

    17, Doorstroom, sum(KPI_Value)

];

note: KPI_Formula may also include Set Analysis expressions

2. KPI_Value containing the KPI's values

KPI_Value:

LOAD * INLINE [

    KPI nr, KPI_Value, KPI_Target

    1, 32, 45

    1, 45, 45

    1, 36, 42

    1, 54, 40

    2, 450, 450

    2, 444, 488

    2, 455, 546

];

If i try to set it all together in a straight table or Pivot...

Dimension:

1. KPI

2. [KPI nr]

Expression:

1.=$(=KPI_Formula)

...I get will get the desired result only if select a single KPI.

This seems logical since Qlikview will have problem to evaluate and aggregate different aggregation on the same expression.

Any idea's how to solve this?

0 Replies