<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Transform field characters. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1661056#M448776</link>
    <description>&lt;P&gt;Merci!&lt;/P&gt;</description>
    <pubDate>Fri, 27 Dec 2019 15:46:02 GMT</pubDate>
    <dc:creator>Judicael</dc:creator>
    <dc:date>2019-12-27T15:46:02Z</dc:date>
    <item>
      <title>Transform field characters.</title>
      <link>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1660840#M448754</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have 2 fields ID, DESCRIPTION&lt;/P&gt;&lt;P&gt;ID =FR12&lt;/P&gt;&lt;P&gt;DESCRIPTION=Diner : 180.00Déjeuner : 200.00Collation : 30.00Transport A/R (sur justificatifs) : 1000.00Hébergement avec petit déjeuner : 750.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I have a table with this:&lt;/P&gt;&lt;P&gt;ID, LABEL, VALUE&lt;/P&gt;&lt;P&gt;FR12, Diner, 180.00&lt;/P&gt;&lt;P&gt;FR12,&amp;nbsp;Déjeuner , 200.00&lt;/P&gt;&lt;P&gt;FR12, Collation, 30.00&lt;/P&gt;&lt;P&gt;FR12, Transport A/R (sur justificatifs), 1000.00&lt;/P&gt;&lt;P&gt;FR12, Hébergement avec petit déjeuner, 750.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2019 16:39:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1660840#M448754</guid>
      <dc:creator>Judicael</dc:creator>
      <dc:date>2019-12-26T16:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Transform field characters.</title>
      <link>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1660879#M448757</link>
      <description>&lt;P&gt;T1:&lt;BR /&gt;LOAD RowNo() as Rec,&lt;BR /&gt;ID,&lt;BR /&gt;DESCRIPTION,&lt;BR /&gt;SubField(DESCRIPTION,':') as DESCRIPTION_NEW&lt;BR /&gt;FROM [lib://Download/Transform_Fields.xls]&lt;BR /&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;P&gt;T2:&lt;BR /&gt;Load *,&lt;BR /&gt;if(left(trim(PurgeChar(SubField(ConcatValues,'-',1),&lt;BR /&gt;'0123456789')),1)='.',trim(PurgeChar(SubField(ConcatValues,'-',1),&lt;BR /&gt;'0123456789.')),trim(PurgeChar(SubField(ConcatValues,'-',1),&lt;BR /&gt;'0123456789'))) as LABEL,&lt;BR /&gt;trim(KeepChar(SubField(ConcatValues,'-',2),&lt;BR /&gt;'0123456789.')) as VALUE1;&lt;BR /&gt;Load *,&lt;BR /&gt;if(ID =Previous(ID) ,Previous(DESCRIPTION_NEW)&amp;amp;'-'&amp;amp;DESCRIPTION_NEW,DESCRIPTION_NEW) as ConcatValues&lt;BR /&gt;Resident T1&lt;BR /&gt;where len(trim(DESCRIPTION_NEW))&amp;gt;0&lt;BR /&gt;Order by ID,Rec&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Drop Table T1;&lt;/P&gt;&lt;P&gt;Drop Fields Rec,DESCRIPTION_NEW,ConcatValues;&lt;/P&gt;&lt;P&gt;T3:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Load *&lt;BR /&gt;Resident T2&lt;BR /&gt;where len(trim(VALUE1))&amp;gt;0;&lt;/P&gt;&lt;P&gt;Drop Table T2;&lt;/P&gt;&lt;P&gt;Value:&lt;BR /&gt;Load Distinct RowNo() as RecNo,&lt;BR /&gt;ID,&lt;BR /&gt;VALUE1,&lt;BR /&gt;SubField(VALUE1,'.')as VALUE2&lt;BR /&gt;Resident T3;&lt;/P&gt;&lt;P&gt;Value2:&lt;BR /&gt;Load *,&lt;BR /&gt;if(ID=Previous(ID) and VALUE1=Previous(VALUE1),num(Previous(VALUE2))&amp;amp;'.'&amp;amp;VALUE2) as VALUE&lt;BR /&gt;Resident Value&lt;BR /&gt;where len(trim(VALUE2))&amp;gt;0&lt;BR /&gt;Order by ID,VALUE1,RecNo;&lt;/P&gt;&lt;P&gt;Drop Table Value;&lt;/P&gt;&lt;P&gt;Left Join(T3)&lt;BR /&gt;Load Distinct ID,&lt;BR /&gt;VALUE1,&lt;BR /&gt;VALUE&lt;BR /&gt;Resident Value2&lt;BR /&gt;where len(Trim(VALUE))&amp;gt;0;&lt;/P&gt;&lt;P&gt;Drop Table Value2;&lt;/P&gt;&lt;P&gt;Drop Field VALUE1;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2019 19:43:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1660879#M448757</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2019-12-26T19:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Transform field characters.</title>
      <link>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1660892#M448758</link>
      <description>&lt;P&gt;I propose you the following scenario&lt;/P&gt;&lt;P&gt;only it is necessary to have a mapping table which contains the whole of what you propose for example :&lt;/P&gt;&lt;P&gt;Déjeuner&lt;BR /&gt;Collation&lt;BR /&gt;Hébergement avec petit déjeune&lt;BR /&gt;Transport A/R (sur justificatifs)&lt;BR /&gt;Diner&lt;BR /&gt;Honoraires/Stand&lt;BR /&gt;Transfert / Pass Metro&lt;BR /&gt;Inscription&lt;BR /&gt;Pause&lt;BR /&gt;Café d'accueil&lt;/P&gt;&lt;P&gt;the idea is to delimit the text.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Input:
LOAD ID, 
     DESCRIPTION
FROM
.\Transform_Fields.xls
(biff, embedded labels, table is Sheet1$);

Mapping1:

Mapping load * inline [
DESCRIPTION,valeur
Déjeuner,_Déjeuner
Collation,_Collation
Hébergement avec petit déjeune,_Hébergement avec petit déjeune
Transport A/R (sur justificatifs),_Transport A/R (sur justificatifs)
Diner,_Diner
Honoraires/Stand,_Honoraires/Stand
Transfert / Pass Metro,_Transfert / Pass Metro
Inscription,_Inscription
Pause,_Pause
Café d'accueil,_Café d'accueil
];

output:
noconcatenate

load MapSubString('Mapping1', DESCRIPTION) as Description_map,
* resident Input;

drop table Input;


output1:
noconcatenate
load *,MapSubString('Mapping1', subfield(Description_map,'_')) as Label_1 resident output;
drop table output;

output2:
noconcatenate
load *,TextBetween(Label_1,'_',':') as Label,num(Keepchar(Label_1, '0123456789.')) as VALUE resident output1 where len(trim(Label_1))&amp;gt;0;
drop table output1;&lt;/LI-CODE&gt;&lt;P&gt;attached the Qlikview file and the results obtained&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/26066iF9AEC2AE977A2626/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(mais entre nous &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; c'est un beau challenge, pour la partie mapping je pense que c'est jouable puisque la liste des services je pense que ça sera fixe et connue à l'avance)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2019 20:59:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1660892#M448758</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2019-12-26T20:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Transform field characters.</title>
      <link>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1660893#M448759</link>
      <description>&lt;P&gt;data source&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2019 21:01:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1660893#M448759</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2019-12-26T21:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Transform field characters.</title>
      <link>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1661055#M448775</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks fot reply. I have a duplicate line&amp;nbsp;&lt;/P&gt;&lt;P&gt;Café d'accueil : 10.00Déjeuner : 50.00Diner : 60.00Hébergement : 163.00Hébergement avec petit déjeuner : 177.00Pause : 10.00Transport A/R (sur justificatifs) : 565.00&lt;/P&gt;&lt;P&gt;Café d'accueil and Pause are duplicate.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 15:45:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1661055#M448775</guid>
      <dc:creator>Judicael</dc:creator>
      <dc:date>2019-12-27T15:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Transform field characters.</title>
      <link>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1661056#M448776</link>
      <description>&lt;P&gt;Merci!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 15:46:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1661056#M448776</guid>
      <dc:creator>Judicael</dc:creator>
      <dc:date>2019-12-27T15:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Transform field characters.</title>
      <link>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1661118#M448781</link>
      <description>&lt;P&gt;Did the solution provided worked for you? If so please mark the reply as correct&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 20:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transform-field-characters/m-p/1661118#M448781</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2019-12-27T20:30:12Z</dc:date>
    </item>
  </channel>
</rss>

