Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data Island and Input Field

Hi All,

Please let me know how to get multiple values from data island table which is a input field

Example

Region and EmpCount is Input Field which user inputs value from front end and its a data island table

DataIslandTable:

Region, EmpCount

ASIA , 5

NAMR, 10

the below pivot table should get the EmpCount value from the data island table

Region, HEADCOUNT

ASIA, 5

EUROPE,0

NAMR,10

LAMR,0

3 Replies
chrismarlow
Specialist II
Specialist II

I created a test app using the following script;

INPUTFIELD EmpCount;

DataIslandTable:
LOAD * INLINE [
RegionOrder, Region, EmpCount
1, ASIA , 0
2, NAMR, 0
];


OtherTable:
LOAD * INLINE [
NotRegion, OtherValue
ASIA,1
NAMR,2
EUROPE,3
LAMR,4

Note the RegionOrder is important to be able to sort the input values, and in the second table I've called it NotRegion (so it does not associate) and OtherValue so I have some other value to show in chart), so get data model like this;

317042_1.png

You can then use Pick/Match and Concat functions to look-up the input value;

317042_2.png

With the whole function being;

Only(Pick(Match(NotRegion, $(=chr(39)&Concat(Region,Chr(39)&','&Chr(39),RegionOrder)&chr(39))),$(=chr(39)&Concat(EmpCount,Chr(39)&','&Chr(39),RegionOrder)&chr(39))))

Seems like a bit of a pain though, don't know if there is a simpler route.

Regards,

Chris.

Anonymous
Not applicable
Author

Hi Chris Marlow,

Thanks for the reply ,

any solution without Region order,  DataIsland Table is a free form where different user enters different value not in order wise

chrismarlow
Specialist II
Specialist II

Hi Shan,

The region order is not trying to specify what order the user should add in, you could hide it from the user & they can add in any order either way. I now cannot recreate the issue the caused me to add it, which was I that I thought I saw the number get assigned to the wrong line (so entered on NAMR & it appeared on ASIA).

You can try it without;

Only(Pick(Match(NotRegion, $(=chr(39)&Concat(Region,Chr(39)&','&Chr(39))&chr(39))),$(=chr(39)&Concat(EmpCount,Chr(39)&','&Chr(39))&chr(39))))

Cheers,

Chris.