Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
alexis
Partner - Specialist
Partner - Specialist

How to answer: "Who has Product A but not Product B"

Hi

I have a requirement where I have a number of customers that are subscribing to one or more services and these services generate revenue which we store as "transaction lines": Simplifying my scenario we have:

Dimension:     "Service"

Expression:     sum(TransactionLines)

The user wants to identify customers that:

a) Have Service "A" but not "B", or

b) Have Service "A" and Service "B" but their Service "B" contributes less than 5% (say) to the total revenue of customer

The user wants to select "A" and "B" from a list

Any ideas how to tackle this one - it sounds like comparative analysis but not sure..

Thanks in advance

Alexis

8 Replies
Not applicable

Can you Show your information? I mean your information do you get from excel? or Upload an excel how you charge the information.

danieloberbilli
Specialist II
Specialist II

Please find attached an example qvw as inspiration. I think you should move some calc. in the script (as contribution <5%).

I used a generic load to bring the service types in different fields and also filled their results in 2 variables so it was easier to use them in expressions.

See also screenshot:

Capture.PNG.png

alexis
Partner - Specialist
Partner - Specialist
Author

That is very helpful Daniel - THANK YOU - it will help me formulate a solution.

I'll need to get around the hardcoding of the services.

Will using comparative analysis be easier or harder?

danieloberbilli
Specialist II
Specialist II

It might be easier if to know how

I use Alternate States for visualization only - so I am not familiar of using them to identify cases within a (more or less) complex expression. Maybe someone else has more experience in this?

alexis
Partner - Specialist
Partner - Specialist
Author

The problem I have is that I have many "Services" (not just two) and I need to make it flexible for them to choose from..

danieloberbilli
Specialist II
Specialist II

I think this shouldn't be a problem in my example: you could  extend the list to a million different Services. At the end you still have only 2 criterias (filled with a million different services each) - so the system is the same

alexis
Partner - Specialist
Partner - Specialist
Author

Hi Daniel

I think the "generic" before your load has thrown me a bit because looking at the data diagram I cannot see how this could become a generic solution with 100s of "service" options..._svise.jpg

danieloberbilli
Specialist II
Specialist II

Have a look at this thread:

http://community.qlik.com/blogs/qlikviewdesignblog/2014/03/31/generic

there is an example of how to join them together