Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
alina_qlik
Contributor III
Contributor III

Ignoring Dimension , Not working when there is no selection but works if dimension is selected .

Hello Experts ,

 

I have data with following fields :

ENTERPRISE, REGION , GRADE , SALE_TYPE , SALE_ID

 

1) Chart1  -  Working Fine

Dimension REGION,GRADE

Expression

aggr({1}Count( DISTINCT {<SALE_TYPE= {'M','C','D'}>}SALE_ID),REGION,GRADE )

 

1) Chart2  -  Not Working the moment I add dimension ENTERPRISE

Dimension REGION,GRADE , ENTERPRISE

Expression

aggr({1}Count( DISTINCT {<SALE_TYPE= {'M','C','D'}>}SALE_ID),REGION,GRADE )

But same Chart 2 , works when I select a value in ENTERPRISE field

 

Please help .

 

4 Replies
felipedl
Partner - Specialist III
Partner - Specialist III

Could be an issue around the data model.

Since it stops working when you select the Enterprise field, I'm assuming there's no condition met for the set analys you've stated with <SALE_TYPE= {'M','C','D'}>.

 

Could you get a straight table showing some data of the dimensions you're getting and the SALE_TYPE field?

 

 

trdandamudi
Master II
Master II

Give a try with below expression :

 

aggr({1}Count( DISTINCT {<SALE_TYPE= {'M','C','D'}>}SALE_ID),REGION,GRADE,ENTERPRISE )

alina_qlik
Contributor III
Contributor III
Author

 

Thanks .

Since it stops working when you select the Enterprise field  - No

Actually it works fine when I select any value in Enterprise field But when nothing is selected the straight table shows -   in expression .

Initially the idea was to calculate count of all SALE_ID under given REGION AND SALE_TYPE , irrespective of ENTERPRISE . And for which expression
aggr({1}Count( DISTINCT {<SALE_TYPE= {'M','C','D'}>}SALE_ID),REGION,GRADE ) , gets me to what is needed .
But when I add dimesion ENTERPRISE in aove table it does not work , however if a make any selection in Enterprise , it works again

alina_qlik
Contributor III
Contributor III
Author

idea was to calculate count of all SALE_ID under given REGION AND SALE_TYPE , irrespective of ENTERPRISE

Then why adding ENTERPRISE to aggr