Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

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 :

idmonthJan-18Feb-18Mar-18Apr-18May-18
123 10010
124 11100
125 00110
126 11111
127 01010
128 01010
129 11111
130 00001
131 00011
132 01111

 

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

 

Labels (2)
1 Solution

Accepted Solutions
marcus_sommer

Maybe as a calculated dimension within a listbox:

if(aggr(count(distinct month) = sum(flag), id), 'all flags are 1', 'flags are missing')

- Marcus

View solution in original post

2 Replies
marcus_sommer

Maybe as a calculated dimension within a listbox:

if(aggr(count(distinct month) = sum(flag), id), 'all flags are 1', 'flags are missing')

- Marcus

ilanbaruch
Specialist
Specialist
Author

Thank You Marcus. it works!
my final
=if(aggr(count(distinct month) = sum(ShowFlag), id), id)