Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to compare two values to hold back one and insert it

Hi all, 

I have some problem, i want find your support please.

I have a source table "Medicament " and a target table "dim_medicament".

in Medicament i have two variables "PrixUnitaire" and "EtatMed

PrixUnitaire is an float

and EtatMed is an integer (who take the 1 if medicament it's available and 0 if isn't)

In the target table , i want add a "Prix" variable who receive the "PrixUnitaire" if the medicament is available and 0 if isn't.

for dim_medicament.Prix i wrote this expression , and i found a some mistakes:

 (Medicament.EtatMed = 1) ? (Prix = Medicament.PrixUnitaire) : (Prix = 0) 

I ask your help above.

Thank you

 

Labels (2)
1 Solution

Accepted Solutions
lojdr
Creator II
Creator II

Hello,

 

What about something like this?

 

 

0683p000009Lsp3.jpg

View solution in original post

2 Replies
lojdr
Creator II
Creator II

Hello,

 

What about something like this?

 

 

0683p000009Lsp3.jpg

Anonymous
Not applicable
Author

Thank you
my problem is resolved