
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Analysis. Field is not equal other field.
Hi,
How can I replace expression below with set analysis?
if(Field1=Field2, 0, Sum(Value))
I tried different variants. For example this one doesn't work as well.
Sum({$<Field1-=Field2>} Value)
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Better to use in script like
If(Field1 <> Field2 , 1, 0) as Flag
And set analysis
Sum({<Flag = {'1'}>}Value)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try
=Sum({<Field1={"=Field1<>Field2"}>}Value)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Max,
Set Analysis is calculated per Chart and You need per Rows.
So
Sum(If(Field1=Field2,0,Value))
However Sintax Set Analysis is like this
Sum({<Field1-={'$(=Max(Field2))'}>} Value)
or like this
Sum({<Field1=E(Field2)>} Value)
Regards,
Antonio

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks but all versions of set analysis don't show an expected result.
I can't use flag in script according to current data model.
Please look at the attachment qvw
First chart shows correct result with IF statement.
Other ones with all set analysis variants above. They show different.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In this case the Expression must be evaluated per row, then You need If() instead of Set Analysis.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be
Sum({<Field2={"=Field1<>Field2"}>}Value)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If its a row to row comparison then I would prefer to have it in the script level .....in the front end it will take lot of time to evaluate and render

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks all and especially Andrey.
to avinashelite
I have created matrix where all values in field1 are equals to all values in field2. Let's say field2 is duplicate from field1.
How can I create flag in script in this case?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if you share the sample data set we could help you out..create a separate thread

- « Previous Replies
-
- 1
- 2
- Next Replies »