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: 
shruthibk
Creator
Creator

how to optimize set analysis expression?

Hi all,

could anybody help me to optimize the expression?

the expression is similar like below

1)

=count({<Num_flag={'1'},rating={'high'},Year={'$(vCurrentYear)'},

[ COB Date],[Audit Date],[Month Name],issue=state1::issue>}DISTINCT(ID))

/

count({<DeNum_flag={'1'},rating={'high'},Year={'$(vCurrentYear)'},

[ COB Date],[Audit Date],[Month Name],issue=state1::issue>}DISTINCT(ID))

is there any way to optimize this code?

2) Dimensions are rating and Month Name

=count({$*state1<Num_flag={'1'}, Year={'$(=num(vCurrentYear)-1)'},[ COB Date],[Audit Date],[Month Name],

issue=state1::issue

>}DISTINCT ID)

/

count({$*state1<deNum_flag={'1'}, Year={'$(=num(vCurrentYear)-1)'},[ COB Date],,[Audit Date],[Month Name],

issue=state1::issue

>}DISTINCT ID)

i would like to exclude the Month Name dimesion in this expression,where this expression should be calculated for only rating ,how can i exclude this dimension?

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

the expression is similar like below

1)

=count({<Num_flag={'1'},rating={'high'},Year={'$(vCurrentYear)'},

[ COB Date],[Audit Date],[Month Name],issue=state1::issue>}DISTINCT(ID))

/

count({<DeNum_flag={'1'},rating={'high'},Year={'$(vCurrentYear)'},

[ COB Date],[Audit Date],[Month Name],issue=state1::issue>}DISTINCT(ID))

is there any way to optimize this code?

You can remove the parentheses around ID. Otherwise? No idea. For some reason I don't seem to be able to open your Qlikview .qvw document.

2) Dimensions are rating and Month Name

=count({$*state1<Num_flag={'1'}, Year={'$(=num(vCurrentYear)-1)'},[ COB Date],[Audit Date],[Month Name],

issue=state1::issue

>}DISTINCT ID)

/

count({$*state1<deNum_flag={'1'}, Year={'$(=num(vCurrentYear)-1)'},[ COB Date],,[Audit Date],[Month Name],

issue=state1::issue

>}DISTINCT ID)

i would like to exclude the Month Name dimesion in this expression,where this expression should be calculated for only rating ,how can i exclude this dimension?

Exclude? I assume you don't mean simply removing it from the expression. Your using Month Name as chart dimension. That means the expression is calculated for the Month Name values. If you want to see the same value for every rating value then add Total <rating> to the expression.

=count(total <rating> {$*state1<Num_flag={'1'}, Year={'$(=num(vCurrentYear)-1)'},[ COB Date],[Audit Date],

issue=state1::issue

>}DISTINCT ID)

/

count(total <rating> {$*state1<deNum_flag={'1'}, Year={'$(=num(vCurrentYear)-1)'},[ COB Date],[Audit Date],

issue=state1::issue

>}DISTINCT ID)


talk is cheap, supply exceeds demand
shruthibk
Creator
Creator
Author

the expression is giving null values