Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
grajmca_sgp123
Creator
Creator

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

0 Replies