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: 
Anonymous
Not applicable

qlik sense conditional script

I am trying to create a field in the data load editor that is based on a condition of other loaded fields. the data base is about chess, my goal is to find the gap in ratings for each game ive loaded. i am wanting to write a condition as follows

if black is winner than (black_rating - white_rating), if white is winner than (white_rating - black_rating)

fyi: existing relevent fields

winner (possible values are black, white)

White_rating (eg. 1400)

Black_rating (eg. 1600)

Labels (3)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If(winner='black', Black_rating - White_rating, White_rating - Black_rating) as Rating_Delta

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If(winner='black', Black_rating - White_rating, White_rating - Black_rating) as Rating_Delta

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com