Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. $300 savings extended to February 9th Learn More
UserID2626
Contributor II

Alternate state in Calculation condition section qlik sense

Hi,

Is it possible to apply alternate condition in calculation condition, i tried with expression its not working

GetSelectedCount(Only({[A]}Product_ID))=1 //getting error *Nested aggregation not allowed*

GetSelectedCount(aggr(only({[A]}Product_ID),Product_ID))=1 //No error but not working correctly

How to apply alternate state ??

 

1 Solution

Accepted Solutions
UserID2626
Contributor II

Re: Alternate state in Calculation condition section qlik sense

Thank you so much  

I  got solution from Your post, but the expression you mentioned was not worked. Below expression is working correctly.

GetSelectedCount([Product_ID],True(),'A')=1

https://help.qlik.com/en-US/sense/September2019/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Fiel...

So Marking this as a solution.

Thanks   &    

View solution in original post

5 Replies
Highlighted
Partner
Partner

Re: Alternate state in Calculation condition section qlik sense

IF A is name of your alternate state, try this:

 

GetSelectedCount(Only({<Product_ID=[A]::Product_ID>}Product_ID))=1

UserID2626
Contributor II

Re: Alternate state in Calculation condition section qlik sense

Thanks for the response  

But I am getting the same error which mentioned in question 

Partner
Partner

Re: Alternate state in Calculation condition section qlik sense

Remove only from that formula

MVP
MVP

Re: Alternate state in Calculation condition section qlik sense

In Getselectedcount() you can directly use alternate state, it was long back (in some qv 11.xx) when it was not allowed. 

Capture.PNG

 

So try like:

GetSelectedCount({[A]} Product_ID)=1

UserID2626
Contributor II

Re: Alternate state in Calculation condition section qlik sense

Thank you so much  

I  got solution from Your post, but the expression you mentioned was not worked. Below expression is working correctly.

GetSelectedCount([Product_ID],True(),'A')=1

https://help.qlik.com/en-US/sense/September2019/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Fiel...

So Marking this as a solution.

Thanks   &    

View solution in original post