Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
How can i write set expression for below code
=count(DISTINCT if(len(GatePassDate)= 0,if(len([Repair Category])<> 0, BBND_ROs)))
regards
mahesh
Hi Bro,
I am getting correct count with my if condition, but i am trying to write in set expression
is it possible.
Regards
or
=Count({<BBND_ROs={"=len(GatePassDate)= 0 and len([Repair Category])<> 0"}>} distinct BBND_ROs)
As performance point of view, we should avoid the if conditions in expression, hence I suggested to move it in script instead
Bro,
Its showing wrong count
Can you try this may be in script, And FYI - I don't think whether you will get any performance issue using simple condition from your original post
Load GatePassDate,
[Repair Category],
BBND_ROs,
if(len(GatePassDate)= 0,if(len([Repair Category])<> 0, 1,0) as Flag
Resident Table
And set analysis may be
Count({<Flag = {1}>}Distinct BBND_ROs)
Create one field in script
LOAD *,
rowno() as Row
FROM table;
Now use this expression
=Count({<Row={"=len(GatePassDate)= 0 and len([Repair Category])<> 0"}>} distinct BBND_ROs)
Ok Bro
Thanks
Bhai, If we use Direct condition If(Condition1, If(Condition2..), Count(..)) this may gets performance. I wonder, How performance issue is involved when we write Count(...If(...If(...))).
Just want to know, Reply me if you feel to share
Hi Bro,
i am using in Text object and getting count 880 as per based on input.
Regards
Could you post your sample qvw?