Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
yahiaoui
Contributor II
Contributor II

not null Qlikview

Hi all,

I want to do an expression in which I don't want that null value be loaded. so I created this one  in wich i want to get only values from N_MAT_VICT where is it not null. The type of this column is varchar:

= if(match(GetFieldSelections(Month),'juin'), num(count( {$<[F_VICT_1]={'O'}, I_FAIT_YP={78} ,(N_MAT_VICT) <> Null() , [Month]={'juin'}

>}  Data_Fact))

but it does not work.
Someone can help me pls.
Thank you

6 Replies
avinashelite

try like this

= if(match(GetFieldSelections(Month),'juin'), num(count( {$<[F_VICT_1]={'O'}, I_FAIT_YP={78} ,N_MAT_VICT = (*) , [Month]={'juin'}

>}  Data_Fact))

= if(match(GetFieldSelections(Month),'juin'), num(count( {$<[F_VICT_1]={'O'}, I_FAIT_YP={78} ,N_MAT_VICT = {'*'} , [Month]={'juin'}

>}  Data_Fact))

or

= if(match(GetFieldSelections(Month),'juin'), num(count( {$<[F_VICT_1]={'O'}, I_FAIT_YP={78} ,N_MAT_VICT = ("=if(len(trim(N_MAT_VICT ))>0, N_MAT_VICT ) ") , [Month]={'juin'}

>}  Data_Fact))

yahiaoui
Contributor II
Contributor II
Author

it does not work ; threr is my expression

=if(match(GetFieldSelections(Month),'juin') , num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'},[Month]={'juin','mai'} , [N_MAT_VICT] = (*)

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'mai'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'mai','avr.'} 

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'avr.'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'mars','avr.'} 

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'mars'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'mars','févr.'} 

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'févr.'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'janv.','févr.'} 

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'juil.'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'juil.','juin'} 

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'août'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'juil.','août'} 

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'sept.'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'sept.','août'} 

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'oct.'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'sept.','oct.'} 

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'nov.'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'nov.','oct.'} 

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'déc.'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'nov.','déc.'} 

>}  Data_Fact))

,if(match(GetFieldSelections(Month),'janv.'), num(count( {$<[F_VICT_1]={'O'}, [Regr_AtteintesVoyageurs]-={'Vols à la tire'}, [Month]={'janv.','déc.'} 

>}  Data_Fact))

))))))))))))

sunny_talwar

You can try these as well"

=If(Match(GetFieldSelections(Month),'juin'),

Num(Count({$<[F_VICT_1] = {'O'}, I_FAIT_YP = {78}, N_MAT_VICT = ("=Len(Trim(N_MAT_VICT)) > 0"), [Month] = {'juin'}>}  Data_Fact))

jonathandienst
Partner - Champion III
Partner - Champion III

This should exclude all null values:

= if(match(GetFieldSelections(Month),'juin'), count({$<[F_VICT_1]={'O'}, I_FAIT_YP={78}, N_MAT_VICT ={'*'}, [Month]={'juin'} >} Data_Fact))

(The bold text selects everything except nulls)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
avinashelite

Sorry . I did a typo error try like this

= if(match(GetFieldSelections(Month),'juin'), num(count( {$<[F_VICT_1]={'O'}, I_FAIT_YP={78} ,N_MAT_VICT = {'*'} , [Month]={'juin'}

>}  Data_Fact))

Its flower bracket

engishfaque
Specialist III
Specialist III

Dear Walid,

Kindly use listed below expression,

Expression 1:

--

=If(match(GetFieldSelections(Month),'juin'), num(count({$<[F_VICT_1]={'O'}, I_FAIT_YP={78}, N_MAT_VICT = {'Null()'}, [Month]={'juin'}>}  Data_Fact)))

Expression 2:

--

=If(match(GetFieldSelections(Month),'juin'), num(count({$<[F_VICT_1]={'O'}, I_FAIT_YP={78}, N_MAT_VICT = {"=Len(Trim(N_MAT_VICT)) > 0"}, [Month]={'juin'}>}  Data_Fact)))

Kind regards,

Ishfaque Ahmed