Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate roll ups in a Straight Table

Hello,

I have a table with a set of retailers. Those retailers roll up into another set of parent retailers. The data is collected on the child/single retailer. How can I set up my data model and chart expressions to show all the retailers including the parents together in one table?

Sample1.PNG

In the data table, each retailer has a set of distinct persons and their ratings.

Sample2.PNG

The retailers are shown below:

Sample3.PNG

The associate with the parent is shown below:

Sample4.PNG

I can add the parent codes to the table above so that there are 3 more rows if necessary. But that is the extent of the manipulation I can do to the data that is imported into Qlikview

Retailer     Retailer Parent

100            100

200             200

300             300


How can I calculate the count of distinct persons for the retailer parents?

Sample5.PNG




2 Replies
Gysbert_Wassenaar

I can add the parent codes to the table above so that there are 3 more rows if necessary. But that is the extent of the manipulation I can do to the data that is imported into Qlikview

Retailer     Retailer Parent

100            100

200             200

300             300

Instead of adding the Parents as Retailers with themselves as Parent you need to add the children to that table with themselves as their own parent. So every Retailer is linked to itself as parent and also with its real parent. Then you can use RetailerParent as dimension in your chart and everything will roll up correctly. The Type field should move from the Retailer table to the RetailerParent table too.


talk is cheap, supply exceeds demand
Not applicable
Author

I used a mapping load to add the parent retailers into the raw data.