Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I need to write a expression in set analysis which should compare between two fields values let say
if field1 value = field2 value and field2 value has more than one IP then sum of values(field2=count(distinct ip)>1)
How to write above condition in set analysis plz...
Thanks
Any Suggestions plz
May be like:
Sum({<KeyField={"=field1=field2"}, field2={"=count(distinct ip)>1"}>}Value)
Note: KeyField here is a field that would uniquely identify the records in the table.
thanks for reply,
actually KeyField is field1 i want to check whether field1 values are present in field2 , if they are present then i need to check whether the values has more then one ip or not
is this right ?
Sum({<field1={"=field2"}, field2={"=count(distinct ip)>1"}>}Value)
Try:
Sum({<field1={"=field1=field2"}, field2={"=count(distinct ip)>1"}>}Value)
and yes based on your requirement, you might have to put the same set condition in the inner count() as well, like:
Sum({<field1={"=field1=field2"}, field2={"=count({<field1={"=field1=field2"}>}distinct ip)>1"}>}Value)
if i need to write not equal then i mean if field1 values should not be in field2 ,
Sum({<field1<>{"=field1=field2"}, field2={"=count({<field1={"=field1=field2"}>}distinct ip)>1"}>}Value)
is above expression right for not present or not equal
You could try:
Sum({<field1={"=field1<>field2"}, field2={"=count({<field1={"=field1<>field2"}>}distinct ip)>1"}>}Value)
However, let me tell you, field1<>field2 is not same as
'if field1 values should not be in field2'
For that you might have to use e()
sorry, may be my english is not good actually what i need to show is
one table
show only values which are present in both the fields and ip>1
second table show remaining i mean
show all the field1 values which or not present in field2 and ip=1 or null
trying to write possible function but throwing error
sum({<field1=p({<field2>}),field2={"count(distinct ip)>1"}value)