Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
New Contributor II

How to Show the Dimension if its excluded based on selection

Hi Every one ,I have requirement to show the Dimension value if its excluded based on  country selection.

TableA:

CountryFlagCID
India1C_101
China0C_102
Asia 1C_103
Bangladesh0C_104
Australia1C_105
Asia 1C_106

TableB

CountryFlagRID
India1R_101
China1R_102
Asia 1R_103
Bangladesh1R_104
Australia0R_105
Srilanka1R_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

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

Expected Output for Bangladesh  and same for other countries which are not in second table..

clipboard_image_3.png