Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
UserID2626
Creator II
Creator 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 ??

 

Labels (3)
1 Solution

Accepted Solutions
UserID2626
Creator II
Creator II
Author

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
DavidM
Partner
Partner

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

 

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

UserID2626
Creator II
Creator II
Author

Thanks for the response  

But I am getting the same error which mentioned in question 

DavidM
Partner
Partner

Remove only from that formula

tresesco
MVP
MVP

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
Creator II
Creator II
Author

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