Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Highlighted
ilanbaruch
Contributor III

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

 

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Customized flags and expression

Maybe as a calculated dimension within a listbox:

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

- Marcus

2 Replies
MVP & Luminary
MVP & Luminary

Re: Customized flags and expression

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
Contributor III

Re: Customized flags and expression

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