Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
beginnertom
Contributor III
Contributor III

How to fill blank under specific condition

Hi everyone,

I have a inline table for illustrate the model i want  as below,

Load * Inline[

Name, Brand,Country

Tom,Abc,Canda

Marry,TNT,China

Jerry,ANT,USA

Kitty,Abc,-

Betty,TNT,-];

If i want to set once the brand is Abc, the blank value in country field will automatically label as Canda(Kitty case). Brand is TNT, the blank value can be auto fill as China(Betty case)

Can i use any qlikvie script to acheive above purpose? Above inline is only a example, i want to use this technique to fill in my business model,

Thanks for everyone who can answer me. Tks!

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

If it's as "simple" as that, you can use ApplyMap() to return the country name based on the brand.

This function takes three parameters:

  1. the first the mapping table (all possible combinations of country name and brand in this case)
  2. the second the input parameter to look up to
  3. the third the default value in case there is no match in the mapping table (i.e.: a brand with no country name in the data model)

View solution in original post

2 Replies
Miguel_Angel_Baeyens

If it's as "simple" as that, you can use ApplyMap() to return the country name based on the brand.

This function takes three parameters:

  1. the first the mapping table (all possible combinations of country name and brand in this case)
  2. the second the input parameter to look up to
  3. the third the default value in case there is no match in the mapping table (i.e.: a brand with no country name in the data model)
beginnertom
Contributor III
Contributor III
Author

Tks it. Work. And helpful!