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: 
New-Qlik
Creator III
Creator III

Set Analyis expression with null handling

Hi,

I want to create set analysis expression to show count as table heading . 

I have used below expression as measure in table and it works

count(

      if((isnull([ Year]) or [ Year]= $(vCurrent_FY)) and
          (isnull([Flag]) or [Flag]= '1') and
         [Master Flag]= '1' 
code)

 

I am trying to add same as table title and don't know how to add and handle null expression

='Table title'  & Num(Count({< [Master Flag] = {'1'},
[Flag]= {'1'}>} Distinct [Code]), '# ##0' )

 

1 Reply
sunny_talwar

Why don't you create a new flag in the script like this

If(Len(Trim(Year)) = 0 or Year = '$(vCurrent_FY)', 1, 0) as YearFlag,
If(Len(Trim(Flag)) = 0 or Flag = 1, 1, 0) as FlagFlag,

and then use it in your expression

='Table title' & 
Num(
Count({<[Master Flag] = {'1'}, [FlagFlag] = {'1'}, YearFlag = {'1'}>} DISTINCT [Code])
, '# ##0' )