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.
![clipboard_image_0.png clipboard_image_0.png](https://community.qlik.com/t5/image/serverpage/image-id/20289i2A8DEB75038D4A80/image-size/medium?v=v2&px=400)
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'.
![clipboard_image_1.png clipboard_image_1.png](https://community.qlik.com/t5/image/serverpage/image-id/20290i72CDB422A553DB36/image-size/medium?v=v2&px=400)
Expected Output for Bangladesh and same for other countries which are not in second table..
![clipboard_image_3.png clipboard_image_3.png](https://community.qlik.com/t5/image/serverpage/image-id/20292iEB6CFD93B65A4013/image-size/medium?v=v2&px=400)