Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
gauthamchilled
Creator
Creator

how to use if statement before preceding load

I want to filter out particular period data from particular country and load all records from all countries for all periods

Load

period as Year,

countryname as Country,

salesmount as Sales,

revenueamoutn as Revenue;

SQL select

period,

countryname,

salesamount,

revenueamt

from Fact;

FACT:

Year,country,sales,revenue

2016,china,2345,1000

2016,australiam2212,2000

2015,netherlands,2300,2341

2016,netherlands,4500,3413

2014,netherlands,3000,3232

2016,USA,34200,2321

from above fact table i want to load all records except 2016 data for netherlands. how can i do that?

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Load

period as Year,

countryname as Country,

salesmount as Sales,

revenueamoutn as Revenue

Where NOT(period = 2016 and countryname = 'netherlands');

SQL select

period,

countryname,

salesamount,

revenueamt

from Fact;

View solution in original post

1 Reply
sunny_talwar

May be this:

Load

period as Year,

countryname as Country,

salesmount as Sales,

revenueamoutn as Revenue

Where NOT(period = 2016 and countryname = 'netherlands');

SQL select

period,

countryname,

salesamount,

revenueamt

from Fact;