Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavik123
Contributor
Contributor

Help on Set Analysis

Hello All,

I want to count number of Suppliers who have transactions for the current month but don't have any transaction in last 11 months.

I want to display it on bar graph & month-year as dimension.

Could you please help me on this?

Thanks & Regards,

Bhavik

7 Replies
swuehl
MVP
MVP

A set expression is evaluated once for the chart, not for every single dimensional value.

Evaluating "sets" in the context of a dimension

Do you need to also consider selections in other fields, like product, for your supplier count?

If not, maybe you can precalculate your supplier count in the script.

swuehl
MVP
MVP

With the help of some preparation in the script, you may do it like

New customer analysis using set analysis

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Another one from the big treasure chest underneath Qlik Community Thanks Stefan.

PrashantSangle

Excellent Thread ...

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
bhavik123
Contributor
Contributor
Author

Thanks Stefan swuehl  this document is very helpful.

Could you please help me in converting the below expression to set analysis form:

= -sum(aggr(only(MonthsBack)=0,AsOfYearMonth,Customer))

As per my requirement, I need to by pass some fields & restrict few values from the fields, so i need convert above expression to set analysis form.

Thanks,

Bhavik

swuehl
MVP
MVP

I don't think there is a (single) set expression for returning the new suppliers per month dimension.

Maybe I misunderstand your request, if you want to add other filters in a set expression, you can add a set expression to any aggregation function like

-sum({SET} aggr(only({SET} MonthsBack)=0,AsOfYearMonth,Customer))

bhavik123
Contributor
Contributor
Author

Thanks Stefan for the prompt response.

Set Condition in function only() will restrict the values & give the desired result but it will change if we can select any other value from the same field in list box.

OR any other way we can achieve the result. My question is to get the count of Suppliers for the current month transaction and there is no transaction recorded against them in last 11 months.

Thanks,

Bhavik