Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have to expression that crashes my application because of the if statement in the expression.
Expression 1:
aggr(if(max(kWh) >=Max_verdi, sum(Max_verdi)),Kunde,Dato,Klokken)
Expression 2:
aggr(if(max(kWh) >=Max_verdi, Max(kWh)),Kunde,Dato,Klokken)
Anyone that can transform the expression to work without the if statement?
Try this and see if it still hangs?
Expression 1:
= aggr(if(Max_verdi <= max(kWh) , sum(Max_verdi)),Kunde,Dato,Klokken)
Expression 2:
= aggr(if(Max_verdi <= max(kWh), Max(kWh)),Kunde,Dato,Klokken)
OR
Expression 1:
= aggr( SUM({< Yourkeyfield = {"=Max_verdi <= Max(kWh)"} >}Max_verdi),Kunde,Dato,Klokken)
Expression 2:
= aggr(max({< Yourkeyfield = {"=Max_verdi <= Max(kWh)"} >}kWh),Kunde,Dato,Klokken)
Try this and see if it still hangs?
Expression 1:
= aggr(if(Max_verdi <= max(kWh) , sum(Max_verdi)),Kunde,Dato,Klokken)
Expression 2:
= aggr(if(Max_verdi <= max(kWh), Max(kWh)),Kunde,Dato,Klokken)
OR
Expression 1:
= aggr( SUM({< Yourkeyfield = {"=Max_verdi <= Max(kWh)"} >}Max_verdi),Kunde,Dato,Klokken)
Expression 2:
= aggr(max({< Yourkeyfield = {"=Max_verdi <= Max(kWh)"} >}kWh),Kunde,Dato,Klokken)
same problem.. because of the if statement. any other suggestion without if?
my data set is to big for the if statements.
Did the set analysis worked? Are these the only expressions you have or do you have any other expressions? How do you know that IF is causing the problem?
Expression 1:
= aggr( SUM({< Yourkeyfield = {"=Max_verdi <= Max(kWh)"} >}Max_verdi),Kunde,Dato,Klokken)
Expression 2:
= aggr(max({< Yourkeyfield = {"=Max_verdi <= Max(kWh)"} >}kWh),Kunde,Dato,Klokken)
Worked perfect Still a littlebit slow, but the application dosent crash. Thank you
because when you use a if statement the expression search in your whole dataset insted of just the tables you want.
i have three more from another chart table :
1: Count(aggr(if(max(kWh) >=Max_verdi, Max(kWh)),Kunde,Dato,Klokken))
2: Count(aggr(if(max(kWh) >=Max_verdi, Max(kWh)),Kunde,Dato))
3: Count(aggr(if(max(kWh) >=Max_verdi, Max(kWh)),Målepunktid))
kWh is the "yourkeyfied"
Did you try using set analysis on all these count expressions as well ?
yes, works perfect ! Thanks !