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: 
infock12
Creator III
Creator III

Ad-hoc Pivot selection issues

Hi all,

I have an Ad-hoc report page with the following script.

AdHocDimensions:
LOAD * Inline
[Dimension_1, dimension_flag
Site, 1
Direct, 2
Dept, 3
Func, 4
]
;

AdHocParameter:
LOAD * Inline
[Parameter_1, Parameter_flag
Grid, A
]
;

 

The expression I am using is below:

  =aggr(nodistinct if(count({<GRating = {'10'}>} GQuestions)>=3 and count({<Rating = {'<=6'}>}GQuestions)=0, 'Outstanding',
if(count({<GRating = {'>=7 <=9'}>}GQuestions)=count(GQuestions
), 'Good',
if(count({<GRating = {'<=3'}>}GQuestions
)>=3, 'Inadequate',
if(count({<GRating = {'<=6'}>}GQuestions
)>=3, 'Requires Improvement',
if(count({<GRating = {'<=3'}>}GQuestions)>=2, 'Requires Improvement',  'Good'))))), Func, Domain, Direct, Site, Dept)

This works when I have selected all the 4 adhoc dimensions in List Box, but when I unselect a dimension, I am getting null values. I tried removing 'nodistinct' but it doesn't help. Looks like something simple but not sure what. Any help is appreciated.

Thanks,

Karthik

 

10 Replies
Not applicable

I would also suggest you palce these in order from best to worse and make sure you do not overlap

there are 2 requireed improvements and several criteria that are <=. >= 3 and your counts can only meet one of the criteria.  Butting them in order will help, and add a catch all that if it is not met put 'Not Applicable' or somethin similar