Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Djafar
Contributor
Contributor

QlikView Problem with expression for Reference Line as Trendline - AVG

Hi,

i defined Variables for the expressions in script:

Set eDurchsatzGesamt_SM2 = SUM({$<BFP.ANLAGE={"SM2"},BFP.KATEGORIE={"Durchsatz gesamt"},MSTINDEX=>}SUMTWERT)*0.97;

Set eHOKVerbrauch_SM2 =
(sum({$<BFP.ANLAGE={"SM2"},BFP.KATEGORIE={"HOK Hubzähler *"},MSTINDEX=>}MAXTWERT)*36.25) ;

Set eHOK_SM2 = num(($(eHOKVerbrauch_SM2)) / ($(eDurchsatzGesamt_SM2)),'#.###,0');

In a chart i use the eHOK_SM2-Variable as Expression. it works well and the qlikview trendline works correct.

Now i want to make a reference line in the chart as trendline.

i can't build a correct expression for it.

Try  avg(eHOK_SM2)  , but doesn't work.

avg($(eHOKVerbrauch_SM2)) / ($(eDurchsatzGesamt_SM2))  doesn't work

without variable:

 =(sum({$<BFP.ANLAGE={"SM2"},BFP.KATEGORIE={"HOK Hubzähler *"},MSTINDEX=>}MAXTWERT)*36.25)
/ (SUM({$<BFP.ANLAGE={"SM2"},BFP.KATEGORIE={"Durchsatz gesamt"},MSTINDEX=>}SUMTWERT)*0.97) works, but not correct , wrong result

=avg((sum({$<BFP.ANLAGE={"SM2"},BFP.KATEGORIE={"HOK Hubzähler *"},MSTINDEX=>}MAXTWERT)*36.25)
/ (SUM({$<BFP.ANLAGE={"SM2"},BFP.KATEGORIE={"Durchsatz gesamt"},MSTINDEX=>}SUMTWERT)*0.97) )

error in expression.

How QlikView build the trendline?

Can anyone help to write the correct expression for the reference line?

kg

Marlis

 

 

0 Replies