
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Count using Set Analysis
Col A ID | Source | Target | ColB ID |
148 | Sys A | Sys K | C1 |
141 | Sys B | Sys K | C1 |
130 | Sys C | Sys K | C1 |
121 | Sys K | C1 |
I created set analysis using the below options and it gives incorrect result.
1)count({<[Target]-={""} distinct Col A ID) - count({<[source]-={""},[Target]-={""}>} distinct Col A ID)
2) count({<[source]={""},[Target]-={""}>} distinct Col A ID)
what am I doing wrong here?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
null values are not always defined by "field={""}", for me the best way to find null values in set analysis would be like this :
count({<[source]={"=len(trim(source))=0"},[Target]={"=len(trim(Target))<>0"}>} distinct Col A ID)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, It's an interesting way to count null values. In my case, only the below expression calculates the value. However, I will examine the underlying data to determine a problem.
count({<[Target]-={""} distinct Col A ID) - count({<[source]-={""},[Target]-={""}>} distinct Col A ID)
Thank you !!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The second expression works, with a slight change to the field name and using []:
count({<[Source]={""},[Target]-={""}>} distinct [Col A ID])
Not sure if that is the issue you were having. I the expression above does not work, you may want to check to see that Source is actually getting populated with Null values.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
null values are not always defined by "field={""}", for me the best way to find null values in set analysis would be like this :
count({<[source]={"=len(trim(source))=0"},[Target]={"=len(trim(Target))<>0"}>} distinct Col A ID)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks but not sure why this doesn't work, maybe because this is one of the many measures in the pivot table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you attach a picture of what you have to see the input and its result?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, It's an interesting way to count null values. In my case, only the below expression calculates the value. However, I will examine the underlying data to determine a problem.
count({<[Target]-={""} distinct Col A ID) - count({<[source]-={""},[Target]-={""}>} distinct Col A ID)
Thank you !!
