Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I am trying to add a condition where measures (a, b, c, d, e etc) should be >=1 and field Resolution should be No errors but I am getting an error. Could anyone help check please?
The measures should have OR condition, hence the +
count({(<[a]>=1> + <[b] >=1> + <[c]>=1> + <[d] >=1> + <[e] >=1> + <[f]>=1> + <[f] >=1> + <[g] >=1> + <[h] >=1>) * <[Resolution]={'No errors'}>}[Work Unit ID])
I am probably going wrong with the syntax of the greater than= expression. Appreciate the help.
Hi, try to use that example -
{<Resolution= {'No errors'}>} count({<[a] = {">=1"}> + <[b] = {">=1"}>} [Work Unit ID])
Hi @MendyS , the above expression is showing Garbage after expression =
I am basically trying to count the work unit ID when either of the measures (a,b, c etc) >=1 and Resolution= {'No errors'}
A simpler way of rewriting this criteria would be just to check if the sum of all a,b,c...h is >=1
=count({
[Work Unit ID]={"=rangesum(alt(a,0),alt(b,0),alt(c,0),alt(d,0),alt(e,0),alt(f,0),alt(g,0),alt(h,0))>=1"}
,[Resolution]={'No errors'}
}[Work Unit ID])
Best would be to create a flag field that checks this criteria during data load as below
Tablename:
Load
a,b,c,d,e,f,g,h,workunitid
,If(rangesum(alt(a,0),alt(b,0),alt(c,0),alt(d,0),alt(e,0),alt(f,0),alt(g,0),alt(h,0))>=1,1,0) as flagfield
From somesourcetable;
Then use the flagfield for simplifying the expression
=count({
,flagfield={1}
,[Resolution]={'No errors'}
}[Work Unit ID])