Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I was trying to do a nested if statement,
Where if the filed "Name"is null and "Filter count" >1 then i wanna display the field "Dept"
Else "Name"
Can some pls look into this.
If(Len(Trim(Name))=0,Dept, If([Filter Count] > 1, Dept, [Name])) as [New Column],
May be this:
If(Len(Trim(Name)) = 0 or [Filter Count] > 1, Dept, Name) as [New Column]
My only question is: What is Filter Count? Is it a field in your database?
May be this:
If(Len(Trim(Name)) = 0 or [Filter Count] > 1, Dept, Name) as [New Column]
My only question is: What is Filter Count? Is it a field in your database?
Filter count is the filed, where i'm checking in the script, if the ID has more than one Name.
If so, we wcannot display the same in the straight table with two values , so we will take Dept. instead of Name.
You can add something like this as an expression:
=If (Count(Name) > 1, Dept, Name)
The new column is taking both the fields sunny.
Even after using the above statement,
Name and Dept.
So, we r having 2 values.
we need group by while using count right???
So, i'm doing a preceding load and using the new filed as "Filter Count"
This trick works in the user interface.
If you need this in a Straight Table, you can simply use aggregation as the dimensions of the straight table will do the group-by anyway.
Yes, Peter.
But i wanna do that in script.
Since there were other calculations based on this filed.
Hi, Mark Graham.
Try:
If(Len(Trim(Name)) = 0 and [Filter Count] > 1, Dept, Name) as [New Column]
I hope this helps!
Hi Jonas,
The above logic displays Dept. only if both the events occur at same time.
I.e. Len(Trim(Name)) = 0 and also filter count >1 ???