Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
rdelagarde
Contributor III
Contributor III

Two dimensions in a table with a condition

Hello,

I want to combine two dimensions in a table with a condition.

Dimension 1: ValueList('A', 'B', 'C')
Dimension 2: If(ValueList('A', 'B', 'C')='C', Name, Null())

What I want to achieve :

rdelagarde_1-1702892548219.png

I get the error : "Invalid dimension" for dimension 2.

 

Thank you very much for your help,

Rémi

 

Labels (1)
1 Solution

Accepted Solutions
Aditya_Chitale
Specialist
Specialist

It won't work with Valuelist() . Alternate way is to create an island table in script and use below expression for Dimension 2.

=If(IslandTableField = 'C', Name, Null())

Replace Valuelist('A' , 'B' , 'C') with Island table field name.

 

Regards,

Aditya

 

View solution in original post

3 Replies
Ahidhar
Creator III
Creator III

try it without using valuelist and us Dimension1 directly

like

Dimension1:-Dimension1

Dimension2:-if(Dimension1='C' , Name , null())

Parthiban
Creator
Creator

Hi,

Instead of Valuelist, Using Inline load in backend for dimension 1.

Ex:

Mapping_Valuelist:
load * Inline [
Dimension_1
A
B
C
];

Main:
load * Inline [
Dimension_2
Alice
Bob
Tom
](delimiter is ',');

Exit Script;

 

In frontend Dimension formula - 

Dimension 1: Dimension_1
Dimension 2: =If(Dimension_1 ='C',Dimension_2,'-').

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!

Aditya_Chitale
Specialist
Specialist

It won't work with Valuelist() . Alternate way is to create an island table in script and use below expression for Dimension 2.

=If(IslandTableField = 'C', Name, Null())

Replace Valuelist('A' , 'B' , 'C') with Island table field name.

 

Regards,

Aditya