
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using aggr in a dimension
Hello community,
Instead of using IF statement, i used the aggr function to create a new dimension. My problem is that the conditions i wrote inside the aggr expression don't apply.
Here's my script: =aggr({<type={'11'} ,role={'1'}>}name,name). I want to show the names of the persons of both type 11 and role 1.
Thanks in advance.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then the suggestion from Omar should work. Check the mentioned number vs. string topic and also if there are multiple names per calculation available because only() woule return NULL in such cases - a check with concat() instead of only() would show it.
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
Aggr( Only({<type={'11'} ,role={'1'}>} name) , name)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the answer, but it doesn't work with the only as i can have names that have my roles or types so it returns NULL.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
and why u don't want to use the IF statement?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you mean an OR between both conditions, like:
Aggr( Only({<type={'11'}> +< role={'1'}>} name) , name)
Update: you should give your condition-values some attention because '11' isn't 11 and '1' isn't 1.
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i don't want to use the if statement because because once i select a name all the filters are going to appear on the filter bar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it's and not or


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then the suggestion from Omar should work. Check the mentioned number vs. string topic and also if there are multiple names per calculation available because only() woule return NULL in such cases - a check with concat() instead of only() would show it.
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
