Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a fact table representing 'entities' .
Joined to that, many attribute tables.
Now I want to include a parent-child relationship table for the entities.
Effectively, the user should be bale to select Parent entity 'A' and see all of it's attributes,
then also see all A's children entities and their attributes.
So I am wondering how best to duplicate all my entities, so that I have a Parent set, and a Child set.
Link the 2 sets with the relationship map table.
First thought was to duplicate all the tables in the load editor.
Then I was drawn to 'Alternate States' ... but struggling to understand how I could link State 'parent' to State 'child' ?
I got thus far :
Crated a table with Dimension 'entity_name'
Then measure :
=count( {<entity_id=$::child_entity_nid>} 1)
This works ONLY if I explicitly select [child_entity_nid] values ... but not if implicit.
Appreciate any pointers,
Thanks.
Hi,
Instead of alternate states have you looked at using P() function? So using toy app script below I think this shows the kind of effect you are looking for;
Cheers,
Chris.
parentchild:
Load * inline [
Parent, Child
, A
A, B
A, C
, D
D, E
];
staticdata:
load * Inline [
Child, Attribute
A, 1
B, 2
C, 3
D, 4
E, 5
];