Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculated dimension with a filter

Hi all, today in my calculated expression i have this

if($(vDay) = 1, FLAG, Aggr(If(Count(DISTINCT {<FLAG = {'NO COMP'}>}FLAG)/Count(DISTINCT {<FLAG = {'NO COMP','COMP'}>}FLAG) > 0.10, 'NOCOMP', FLAG), DEV_ID_LOC, DEPADR_PAYS_LIB, MAG_LIBELLE, JOUR_ID))

I want to change it like this


If ($(vDay) = 1


Get the value of FLAG where {<FILTER_JOUR_ID = {"$(=$(vNdebut))"}>}

Else


Aggr(If(Count(DISTINCT {<FLAG = {'NO COMP'}>}FLAG)/Count(DISTINCT {<FLAG = {'NO COMP','COMP'}>}FLAG) > 0.10, 'NO COMP', FLAG), DEV_ID_LOC, DEPADR_PAYS_LIB, MAG_LIBELLE, JOUR_ID))

only for the period selection in [Groupe1]* $}

A bit confused, Please hint me


Thanks in advance

1 Reply
Anonymous
Not applicable
Author

I tied this for the first part unfortunately it did not work

if($(vDay) = 1, only({<FILTER_JOUR_ID = {"$(=$(vNdebut))"}>}FLAG),

2nd try

if($(vDay) = 1, only({<FILTER_JOUR_ID = $(vNdebut)>}FLAG)

3rd try

if($(vDay) = 1, if(FILTER_JOUR_ID ={"$(=$(vNdebut))"},FLAG,null())

This is for informaiton