Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, everybody,
I have an straight table with an expression:
count({$<Kód={'M'},Druh={'VP'},Séria={'04. Nominácie_VÚ'}>}Projekt)
How is the correct syntax for setting condition for showing record only if expression value > 3 ?
Thank you in advance.
Duski
Thank you very much, sunindia,
but my expression is actually by far complicated, as in my example above 😞
---------------------------------------------------------------------------------------------------------------
If(count({$<Kód={'PN'},Druh={'DOD'},Séria={'02. Nominácie_OÚ'},ZdrojDat={'NOM'}>}Projekt)>=3,
(
(sum({$<Kód ={'M'}>} aggr(sum({$<Kód ={'M'},Druh={'VP'},Séria={'02. Nominácie_OÚ'},ZdrojDat={'NOM'}>}Čiastka),
CISLOSTAVBY,Projekt,Séria,Kód,ZdrojDat,Druh,Činnosť,Fáza_RSV))
/
sum({$<Kód ={'PN'}>} aggr(sum({$<Kód ={'PN'},Druh={'VP'},Séria={'02. Nominácie_OÚ'},ZdrojDat={'NOM'}>}-1*Čiastka),
CISLOSTAVBY,Projekt,Séria,Kód,ZdrojDat,Druh,Činnosť,Fáza_RSV))
)*100
-
(sum({$<Kód ={'M'}>} aggr(sum({$<Kód ={'M'},Druh={'DOD'},Séria={'02. Nominácie_OÚ'},ZdrojDat={'NOM'}>}Čiastka),
CISLOSTAVBY,Projekt,Séria,Kód,ZdrojDat,Druh,Činnosť,Fáza_RSV))
/
sum({$<Kód ={'PN'}>} aggr(sum({$<Kód ={'PN'},Druh={'DOD'},Séria={'02. Nominácie_OÚ'},ZdrojDat={'NOM'}>}-1*Čiastka),
CISLOSTAVBY,Projekt,Séria,Kód,ZdrojDat,Druh,Činnosť,Fáza_RSV))
)*100),
0)
--------------------------------------------------------------------------------------------------------------
Can you help me with this ravel ?
Thanx in advance.
Duski
I would suggest doing the heavy lifting within the script if possible. By doing that you will simplify your expression, in addition the performance will also increase, because it won't have to go through the if statements.
But with that said, instead of me troubleshooting the formula without knowing what any of this means, I suggest you to share an application with some dummy data and we can help you resolve your issue from there.
Best,
S
Hello sunindia & Dusan Vavra,
I have the similar problem, and I checked the Demo of sunindia. that's so close to solved my problem. Because I need segment to the "Sum(Units)". So when I added an 'and' conditional to the IF(), the 'Total' will be 0.
like this : If(Sum(Units) > 50 and Sum(Units) < 90, Sum(Units) , 0)
My Expressions just use 'null()' replace 0.
If(Sum(Units) > 50 and Sum(Units) < 90, Sum(Units) , null() )
l don't know what's the problem? Can you help me?
Thank you very much!
Kevin.
Can you share the sample data with the output you want and the output you are getting right now?
Best,
S
I have a straight table, 3 Dimension and 5 Expression.
Exp5=Exp1+Exp2+Exp3+Exp4;
4 Button and a variable by Action Control segment data of Exp5 ;
<>0, >1<=10, >10<=26, >=36;
Exp5=
If(variable='<>0' and Sum(Sales) <>0 ,Sum(Sales),
if(variable=' >1<=10' and Sum(Sales) >1
and Sum(Sales) <=10,Sum(Sales),
if(variable=' >10<=26' and Sum(Sales) >10
and Sum(Sales) <=26,Sum(Sales),
if(variable=' >=36' and Sum(Sales) >=36
,Sum(Sales),null())))
others Exp need have a judgment base on Exp5. order to when Exp is null others need reply null.
Exp4=
if( isnull([Exp5]),0,Exp4);
Exp3=
if( isnull([Exp5]),0,Exp3);
Exp2=
if( isnull([Exp5]),0,Exp2);
Exp1=
if( isnull([Exp5]),0,Exp1);
and then, the I found the 'Total' of the bottom has lose the value when I click the Button to action variable.
hope my describe is clear.
thanks,
Kevin.
I feel that you need to check your if statements differently here. Try something like this:
Exp5=
If(variable <> 0 and Sum(Sales) <> 0 ,Sum(Sales),
if(variable >1 and variable <=10 and Sum(Sales) >1
and Sum(Sales) <=10,Sum(Sales),
if(variable>10 and variable <= 26 and Sum(Sales) >10
and Sum(Sales) <=26,Sum(Sales),
if(variable >=36 and Sum(Sales) >=36
,Sum(Sales),null())))
I hope this helps.
Best,
S
may be my describe has some problem. I make a sample but I don't know how to insert the qvw file.
when click button, the 'Total' of the bottom not display or is not right.
please check my sample.
Hi sunindia,
if you see my sample? I send again. I have 4 button action a variable vTes1 to control Exp5's value, Exp5 has be segment 4 part.
the problem is the "Total" of bottom in the table has lose or not right when I click the button except '<>0'.
any suggestion for this?
thanks!!
Was out of town... just came back... will look at it right now.
Best,
S