Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data model / if statement very confused right now

hi

i have a simple data structure whereby i wish to look up the values from two different tables based on a condition

i have attached my document

the issue  is this.

when a 'x' is present in the field "product group check" then the value product group from the table FACT should be presented.

however if a cost center is present in the FACT Table then the value should instead be derived from the TABLE CostCenter.

i have the first condition working fine however the second condition does not work

i should have the value 812 on the item 100 in the table box as well.

Statement:

if([product group check] ='x',[Product Group],

if([product group check] = 'x' and [Product Group] = '',

[ProductGroup], 'not found'))

Best

Brad

1 Solution

Accepted Solutions
Not applicable
Author

Bradley,

the if statements tells to show product group when product group is ' ' , so nothing is showed.

Regards,

Gerrit

View solution in original post

3 Replies
Not applicable
Author

Bradley,

the if statements tells to show product group when product group is ' ' , so nothing is showed.

Regards,

Gerrit

Not applicable
Author

Thanks Gerrit.

is there a way to show both values perhaps?

what i aim to do actually is have both the right cost center product group mapped or the given product group by the user.

so in this case the correct answer would be

Item  Product Group

100  850

200  812

Best

Brad

Not applicable
Author

Bradley,

if([product group check] ='x' and [Product Group] >0 ,[Product Group], CostCenter)

See also attached x2.qvw

Regards,

Gerrit