
Specialist
2018-12-06
11:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Customized flags and expression
hi all,
in my model i have a pivot table with Product_id and month as a dimension,
sum(flag) - as an expression
result is as below :
id | month | Jan-18 | Feb-18 | Mar-18 | Apr-18 | May-18 |
123 | 1 | 0 | 0 | 1 | 0 | |
124 | 1 | 1 | 1 | 0 | 0 | |
125 | 0 | 0 | 1 | 1 | 0 | |
126 | 1 | 1 | 1 | 1 | 1 | |
127 | 0 | 1 | 0 | 1 | 0 | |
128 | 0 | 1 | 0 | 1 | 0 | |
129 | 1 | 1 | 1 | 1 | 1 | |
130 | 0 | 0 | 0 | 0 | 1 | |
131 | 0 | 0 | 0 | 1 | 1 | |
132 | 0 | 1 | 1 | 1 | 1 |
i want to create a flag - for filtering or to use within an expression or or a calculated dimension
and the result will show only the id's with 1 value in the pivot table -
sum(flag)=1 in all months selected.
id's -126, 129 in the above table
any ideas?
advanced thanks
1,179 Views
1 Solution
Accepted Solutions


MVP
2018-12-06
11:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe as a calculated dimension within a listbox:
if(aggr(count(distinct month) = sum(flag), id), 'all flags are 1', 'flags are missing')
- Marcus
1,167 Views
2 Replies


MVP
2018-12-06
11:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe as a calculated dimension within a listbox:
if(aggr(count(distinct month) = sum(flag), id), 'all flags are 1', 'flags are missing')
- Marcus
1,168 Views

Specialist
2018-12-06
05:06 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank You Marcus. it works!
my final
=if(aggr(count(distinct month) = sum(ShowFlag), id), id)
my final
=if(aggr(count(distinct month) = sum(ShowFlag), id), id)
1,156 Views
