Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Every one ,I have requirement to show the Dimension value if its excluded based on country selection.
TableA:
Country | Flag | CID |
India | 1 | C_101 |
China | 0 | C_102 |
Asia | 1 | C_103 |
Bangladesh | 0 | C_104 |
Australia | 1 | C_105 |
Asia | 1 | C_106 |
TableB
Country | Flag | RID |
India | 1 | R_101 |
China | 1 | R_102 |
Asia | 1 | R_103 |
Bangladesh | 1 | R_104 |
Australia | 0 | R_105 |
Srilanka | 1 | R_106 |
Script:
LOAD
Country,
Flag,
CID,
'Controls' as Indicator
FROM [lib://datasource/Sampledata.xlsx]
(ooxml, embedded labels, table is Sheet3)
where Flag=1 ; //Excluded China ,Bangladesh due to this filter
Concatenate
LOAD
Country,
Flag,
RID,
'Risks' as Indicator
FROM [lib://datasource/Sampledata.xlsx]
(ooxml, embedded labels, table is Sheet4)
where Flag=1 ; //Excluded Australia due to this filter
I created table with dim as Indicator and exp :if(Indicator='Controls', Count(CID),Count(RID)).
For example if user select Asia we want to see count by each indicator, here result is fine as we have country in both tables.
If user selects Bangladesh we can see count for Risk only.But he wants to see the other dim value(Control) and count as '0'.
Expected Output for Bangladesh and same for other countries which are not in second table..