Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
ianweb100
Contributor II
Contributor II

Constraints tables

Hi all, I'm new to Qlik and coming from tableau I am finding Qlik a bit daunting, hopefully I am wrong and I will get up top speed.

I have the following table

  Skill                                       Relation

  Excel                                      Essential

  SAS                                        Essential

  Python                                   Optional

   R                                           Optional

Communication                        Essential

Second Language                    Optional

I want to build to separate tables , using Relation as a filter. The final result should be:

Skill

Excel

SAS

Communication

Skill

Python

R

Second Language

Do I always need to write expressions or is possible to just Qlik and go ?

8 Replies
undergrinder
Specialist II
Specialist II

HI Ian,

If we are speaking about the frontend then i Suggest you to use pivot table object to do that.

If this related to data loading and preparation, please provide more example.

G.

Anonymous
Not applicable

Use in script like this:

LOAD

          REF,

          [Your old code here],

          if( Relation = 'Essential', Skill ) as Essential_SKILL,

          if( Relation = 'Optional', Skill ) as Optional_SKILL

FROM [ your file]

....

this will create a table where Essential_SKILL is only the skills marked in Relation as Essential. and so on.

Thiago_Justen_

I would suggest (considering your request) this piece of script:

SINGLE_TABLE :

LOAD * INLINE [

Skill,                            Relation

Excel,                          Essential

SAS,                            Essential

Python,                        Optional

R,                                 Optional

Communication,          Essential

Second Language,      Optional

];

Essential_Skill:

Load

    Skill as Essential_Skill

Resident SINGLE_TABLE where WildMatch(Relation,'Essential');

Optional_Skill:

Load

    Skill as Optional_Skill

Resident SINGLE_TABLE where WildMatch(Relation,'Optional');

Drop Table SINGLE_TABLE;

This script will produce two separeted tables.

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

My question would be, why do you want to create two separate tables?  You can Relation as a filterpane and filter what you want.  How do you want your end UI to behave?

-Rob

ianweb100
Contributor II
Contributor II
Author

Tks all for your responses. Dear Rob I need to tables because I have 3000 occupations and my final goal is as you choose a starting occupation and a target occupation you can see the skill difference.

Hi Thiago Justen teixeira , do I use your code in the loading section or in the fx function of the variable?

Tks all

Thiago_Justen_

Load section Ian.

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It still strikes me as better solved with a set analysis expression vs creating separate tables.

set 1: Set of Skills for starting occupation.

set 2: Set of skills for target occupation.

answer:  Delta between set1 and set2.

-Rob

ianweb100
Contributor II
Contributor II
Author

I tried set analysis, but I'm new to the Qlik language and It failed everytime.

The load approach and create new variables seems better for filtering. The filtering options in Tableau are superior I guess. I'm still trying to be wowed by Qlik.