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: 
raadwiptec
Creator II
Creator II

Changing Dimension

I have 2 Sources.. 

Source 1

-----------------------

1. Payment Dates 2. Amount 3.Player, 4.Currency , Year

We make a key based on Player ,currency and Year

Source 2

-------------------------

PlayerCurrencyEnd YearAgentEffective DateDeletion Date
2861AUD201699872019092620210117
2861AUD201692342021011820210223
2861AUD201697662021022499999999

 

The Objective is to bring the Agent Field out based on the Payment Dates.. 

 

So for Ex: If payment Date is 20200926 - The Agent should be 9987

                    If payment Date is 20210201 - The Agent should be 9234

                else      If payment Date is 20210922- The Agent should be 9234

 

Thanks to suggest

Labels (1)
1 Solution

Accepted Solutions
Vikash
Contributor III
Contributor III

Hi,

You can use -

Source1:
LOAD * INLINE [
Payment Dates, Amount, Player, Currency, Year
20200926, 2500, 2861, AUD, 2016
20210201, 3500, 2861, AUD, 2016
20210922, 6512, 2861, AUD, 2016
];


Source2:
LOAD * INLINE [
Player, Currency, End Year, Agent, Effective Date, Deletion Date
2861, AUD, 2016, 9987, 20190926, 20210117
2861, AUD, 2016, 9234, 20210118, 20210223
2861, AUD, 2016, 9766, 20210224, 99999999
];

Inner join IntervalMatch([Payment Dates])
Load [Effective Date],
[Deletion Date]
resident Source2;

 Hope this helps!

VK

 

View solution in original post

1 Reply
Vikash
Contributor III
Contributor III

Hi,

You can use -

Source1:
LOAD * INLINE [
Payment Dates, Amount, Player, Currency, Year
20200926, 2500, 2861, AUD, 2016
20210201, 3500, 2861, AUD, 2016
20210922, 6512, 2861, AUD, 2016
];


Source2:
LOAD * INLINE [
Player, Currency, End Year, Agent, Effective Date, Deletion Date
2861, AUD, 2016, 9987, 20190926, 20210117
2861, AUD, 2016, 9234, 20210118, 20210223
2861, AUD, 2016, 9766, 20210224, 99999999
];

Inner join IntervalMatch([Payment Dates])
Load [Effective Date],
[Deletion Date]
resident Source2;

 Hope this helps!

VK