Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following tables:
Table1
ID | StartDay | EndDay |
1 | 1 | 4 |
2 | 9 | 15 |
Table2
ID | StartDay | EndDay |
1 | 2 | 4 |
2 | 7 | 12 |
I'm trying to create a distribution plot that compares day overlaps between the two tables, with the ID column for each serving as a calculated dimension so that a list of the dimension values would be 'Table1: 1', 'Table1: 2', 'Table2: 1', 'Table2: 2'.
I am aware that it would be best practice to create the concatenated table in a load script, but I am using a vendor that only gives me access to chart functions, so how do I do this in a chart function?
Firstly, you'll need to have column names in both tables to be different from each other in order to differentiate Table1 and Table2 at chart level. After that you may create separate dimensions for both tables with something like following expression:
Overlap for Table1
=if(StartDay1>=StartDay2 and EndDay1<=EndDay2,ID1)
Overlap for Table2
=if(StartDay2>=StartDay1 and EndDay2<=EndDay1,ID2)
Hope it helps.