Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hiya All
I am trying to Sum a Field base don IF can you guys help
if transtype - 1 Sum (Transtype) as T1
if transtype - 1 Count (Transtype) as T2
Can anyone help please?
Thanks
Hi,
If you are doing this in script it will be some from of aggregation. something like
Load
...
SUM(transtype) as T1,
Count(transtype) as T2
Resident 'Your Table'
Where transtype = 1
Group by FIELD;
Mark
Hi,
Need more explanation..
Provide some data..
Regards
What is the condition here? May be something like this:
Sum(If(Condition = Something, Transtype)) as T1,
Count(If(Condition = Something, Transtype)) as T1,
try like this?
If(transtype=1, sum(transtype)) as T1
If(transtype=1, Count(transtype)) as T1
Hi,
If you are doing this in script it will be some from of aggregation. something like
Load
...
SUM(transtype) as T1,
Count(transtype) as T2
Resident 'Your Table'
Where transtype = 1
Group by FIELD;
Mark
Add column
Sum(If(Condition = Something, Transtype)) as T1,
Count(If(Condition = Something, Transtype)) as T1,
While resident load in your script.