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: 
Anonymous
Not applicable

Issue in Chart

Dear All

I have a pivot table where in if I select any particular value in Column - Entity then expression shows correct value(Gross Collectable measure) for that Entity.

However if I deselect the particular Entity then expression does not calculate the correct value for that entity (It ignores the variable vEnd).

(Screenshots attached- Correct and Incorrect).

Gross Collectable expression is as below:

=sum( {< Day =  {"<=$(=$(vEnd))"}, NEW_AGENT_NAME={'*'},NEW_ENTITY_CODE={'CRP*'}}>}      Value)

where vEnd is defined as vEnd= round(($(vNoOfDays+1) -  CP))     

Here CP is number like 18, 15 etc.

I tried things like aggr and also passing the dimension in expression but it did not work. Is there any mistake ?

Kindly suggest if any changes need to be made.

Thanks & Regards

Chintan

15 Replies
Anonymous
Not applicable
Author

I will try and let you know. 

Anonymous
Not applicable
Author

Hello Sunny

Thanks for your help

It works correctly as required.

Why is the if condition used as always it needs to be calculated till the value for noofdays - CP.

Regards

Chintan

sunny_talwar

Why is the if condition used as always it needs to be calculated till the value for noofdays - CP.

Is this a question for me? I am not sure I understand your question

Anonymous
Not applicable
Author

Just wanted to know why 'if'  condition was used in expression. 

sunny_talwar

Because Set analysis is evaluated once per chart whereas your requirement needed you to evaluate the vEnd differently for each dimension. To do this, Aggr was the option unless you wish to make changes to your script and then you can use search string set analysis

Anonymous
Not applicable
Author

Thanks!