Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count with Set Analysis Search

Trying to accomplish count of stores if Season to Date sum of shipped units greater than zero. 

- Having trouble with Set Analysis, as it doesn't seem like you can do a set analysis search within a search... Expression I am trying that is not working:

Count({<Store = {"=sum({$(vReleaseDates),season={"$(=max(season))"} }Shipped)"}>}Distinct Store)

Note that vReleaseDates simply releases the dates for the Season To Date to have the expected effect.

I think the issue has to do with embedding search expressions within the set analysis' second layer. 

Is it possible to do this without an IF statement??

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

You are missing the angle brackets and i would replace the inner quotes with single quotes. Are you trying to do this on a row by row basis? Set analysis is evaluated once for the entire chart and not once per row.

It also depends a lot on how vReleaseDates is defined, Test and develop the expression with literal text before replacing the text with a variable.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

6 Replies
sunny_talwar

Can you share a sample application where you are trying to do this?

petter
Partner - Champion III
Partner - Champion III

So how does the content of vReleaseDates look like?  You seem to lack some angle brackets there ... the < and >

vincent_ardiet
Specialist
Specialist

Hi,

Your expression is not totaly clear.

What the season={"$(=max(season))"} stands for? You are not talking about that in your explanation.

And like Peter said, your expression seems unbalanced. Can you replace $(vReleaseDates) by its content?

But, on the paper, what you ask for seems feasible with set analysis.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Count({<Store = {"=sum({<[Season To Date]={$(vReleaseDates)},season={"$(=max(season))"}> }Shipped)"}>}Distinct Store)


Note: [Season To Date] with your actual field name.


Hope this helps you.


Regards,

Jagan.

jonathandienst
Partner - Champion III
Partner - Champion III

You are missing the angle brackets and i would replace the inner quotes with single quotes. Are you trying to do this on a row by row basis? Set analysis is evaluated once for the entire chart and not once per row.

It also depends a lot on how vReleaseDates is defined, Test and develop the expression with literal text before replacing the text with a variable.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

‌Missing angle braces are simply a typo from typing it into the community.  i don't think vReleaseDates is the issue.. It just says to ignore selections in various date fields.  e.g. Week=,Month=,Year=,

I will try to construct an example QVW later on.

Thanks!