Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am unable to achieve the following in a Qlikview report.
I have the date as following:
ID | Provided To | Customer Name | Partner Name |
1 | Customer | John | Mel |
2 | Partner | Stuart | Jessy |
3 | Both | David | Sue |
4 | Both | Josh | Cathey |
And I need to populate as following: If the 'Provided To' is for 'Both' then a separate record should be inserted for the Customer and Partner. Please help.
ID | Provided To | Customer Name |
1 | Customer | John |
2 | Partner | Stuart |
3 | Both | David |
3 | Both | Sue |
4 | Both | Josh |
4 | Both | Cathey |
Maybe something like this
load
ID,
[Provided To],
SubField(Customername,'-') as Customername ;
LOAD ID,[Provided To] ,if([Provided To]='Both', Customer&'-'&Partner , Customer) as Customername INLINE [
ID, Provided To, Customer, Partner
1, Customer, John, Mel
2, Partner, Stuart, Jessy
3, Both, David, Sue
4, Both, Josh, Cathey
];