Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

Expression not working when dimension not selected ?

Hello All,

I have got pivot table in my dashboard in qliksense . Below is the image of dashboard .

My expression :

For Row1 - Count({$<[UW_MONTH_KEY] = {"$(=$(vMaxUWMonth))"},POLICY_STATUS={'Active'}>} DISTINCT POLICY_NUMBER)

        Row2 -  Count({$<[UW_MONTH_KEY] = {"$(=$(vMaxUWMonth))"},POLICY_STATUS={'Cancelled'},POLICY_CANCELLATION_DATE_YearMn = {"$(=$(vMaxUWMonth))"}>} DISTINCT POLICY_NUMBER)

        Row3 - Count({$<[UW_MONTH_KEY] = {"$(=$(vMaxUWMonth))"},CLAIM_STATUS_FINAL={'OPEN'} >} DISTINCT CLAIM_NUMBER)

 

All the expression is working when a partner is selected. in image 2.

How can the expression work even if the partner is not selected and works when selected by user.

Thanks in Advance.

Requirement.PNG

 

Partner.PNG

5 Replies
sunny_talwar

All 3 expressions don't work without selection? In general, you might need to use Aggr() with if statement instead of using set analysis to make this work.

suvechha_b
Creator III
Creator III
Author

I am tried to import less data and make a sample model. Please can you assist me in the expression to use if and Aggr().

Why can't the set analysis work with dimension ?

sunny_talwar

I think you forgot to answer my first question, are all the three expressions not working? I guess what will really help is to know what is the output you are hoping to get?

Also, right now when I don't have RECORD_SOURCE_NAME selected or not selected, I am getting the same number. Can I see the problem in the attached sample?

suvechha_b
Creator III
Creator III
Author

Hi Sunny ,

All the expression is not working when no selection is made i.e when no RECORD_SOURCE_NAME is selected. 

I just gave first three as sample example as I got many expression.

My output pivot table should work for no selection of  RECORD_SOURCE_NAME or when selected.

 

The sample model is reflecting correctly with or without selection.

But the original model is not working correctly. My original model is around 576 MB

sunny_talwar

Not really sure how to help if I can't see the problem 🙂