Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to apply same filter in different context?

I have a table of PRODUCTs.  These PRODUCTs are sold by PARTNERs and are part of an ORDER_ITEMS, which (as expected) compose an ORDER.

On occasions, these PRODUCTs are involved in EVENTs (say, "maintenance").

Customer wants to create an "event index" which is defined by #EVENTS per PRODUCT/ sum( sold PRODUCTs).

One interesting analysis is to filter by PARTNER.  In other words, I would like to calculate which PARTNER generate less EVENTs.

The problem is that this is creating a circular reference in my data model (as seen in the picture below), given the fact that I need to filter by PRODUCTs "which were sold" and PRODUCTs "which were involved in EVENTs".

I have created two PRODUCTs tables ("PRODUTOS"), and initially I have thought of applying set analysis (filter by product involved in events and calculate sum({<PRODUCT_ID={"$(=getFieldSelections(PRODUCT_EVENT_ID))"}>} SOLD_PRODUCTS) (something along these lines...)

However, this approach seems TOO convoluted.

How can I break this (potential) circular reference and apply this kind of filter in these two different contexts?

Thanks in advance for any ideas and/or insights!

Paulo

0 Replies