Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
alessandrotk
Contributor II
Contributor II

Dimension based on another dimension

Hi,

I'm looking for a way to handle this at sheet level (not script or using variables) so that I can have a dimension called "Title" to be based on a sort of if statement from another dimension called "Name"

I don't want to write if [Title]='Customer Support Engineer' then 'Technical Support Engineer', but rather if [Name] is 'Mark' then the [Title] value should be used from 'Paul' instead ('Technical Support Engineer').

 

Load * Inline [

ID, Name, Age, Title

1, Wladimir, 31, Team Lead

2, Paul, 22, Technical Support Engineer

3, Mark, 40, Customer Support Engineer

4, Janne, 27, IT Specialist

];

 

example_qlik_sense.jpg

Try to handle this at a table level if possible.

 

Thanks,

Labels (1)
4 Replies
brunobertels
Master
Master

Hi 

may be this 

if(match(Title,'Customer Support Engineer'),'Technical Support Engineer',Title)

PhanThanhSon
Creator II
Creator II

Hi,

I know an easier way, you don't even have to open your script editor for this, but loading the data is necessary:

  1. Go to "Edit Sheet".
  2. Select "Left Fields".
  3. Click on "ADD Data".
  4. Choose "Manual entry".
  5. Rename the first field to "Title".
  6. Rename the second field to "Title Adjusted".
  7. Write the mapping correctly.
  8. Give a name to the table.
  9. Click on "Next" (to load the data).

PhanThanhSon_0-1710513372848.png

PhanThanhSon_1-1710513417267.png

 

This will create a new table in the background without ever having been in the editor or having written an IF statement.

PhanThanhSon_2-1710513449245.png

I would recommed you to work in the script directly but this solves your problem.

 

Best regards Son

 

MatheusC
Specialist
Specialist

Hi, @alessandrotk 

Following the idea given by @brunobertels , if there are other titles like 'Customer Support Engineer' and you just want to change Mark's, you can also add and as follows:

if(match(Title,'Customer Support Engineer') and Name='Mark','Technical Support Engineer',Title)


Regarts, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
alessandrotk
Contributor II
Contributor II
Author

Hi,

I don't want it to be based on/hard coded to the [Title], but rather [Name] since that person could have a new Job Title in the future. I'd like to be always based on [Name] and display the [Title] value from that hard coded name instead.

logically I tried something like 

if([Name]='Mark', aggr([Title], [Name]='Paul'), [Name]) 

but I can't have aggr in a dimension and it doesn't seem to work either.

Thanks