Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

rsanth33
New Contributor

Qlik Sense Data Load Syntax Help - Case Statement + Select Subquery + Calculations

Hi,

I need help with the case statement syntax while loading the data in Qlik Sense.

Below is my logic code;

Vendor:

LOAD "Vendor Name"

FROM [lib://vendordata.xls];

/// Need help with the syntax for the below code ////

Table1:

LOAD *,

CASE

WHEN Percentage = 100%

THEN invoice_line_total

ELSEIF Percentage = 10% and (IF [Column.Vendor] Match (select [Vendor Name] from Resident Vendor))

THEN  column a * column b

ELSEIF Percentage = 10% and (IF [Column.Vendor] Not Match (select [Vendor Name] from Resident Vendor))

THEN column a * Percentage

ELSEIF IF [Vendor] Match (select [Vendor Name] from Resident Vendor)

THEN column a * column b

ELSE 0

END as "New Column"

FROM [lib://Masterdata.qvd]

Drop Table Vendor;