<?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: Grouping in Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748383#M453457</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/23929"&gt;@jlampard40&lt;/a&gt;&amp;nbsp; you can use Mapping table like this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;MapField:
mapping load * inline [
FieldtoMap,Mapby
CTMOB,External
MSPI,External
XSPI,External
CSPI,External
CTMOB2,External
RMR2,Internal
SMR1,Internal
SMR2,Internal
SMR3,Internal
SMR4,Internal
SMR5,Internal
];

YOURTABLE:

load 
Applymap('MapField',FieldtoMap,'Other Rooms') as New_Field,
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 10:09:05 GMT</pubDate>
    <dc:creator>Taoufiq_Zarra</dc:creator>
    <dc:date>2020-09-30T10:09:05Z</dc:date>
    <item>
      <title>Grouping in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748382#M453456</link>
      <description>&lt;P&gt;Hi guys - I need to group some fields into common groups, so that I can then use a list box to select in my dashboard.&lt;/P&gt;&lt;P&gt;The dimension is called:&amp;nbsp; AD_Room&lt;/P&gt;&lt;P&gt;There are many outputs in this dimension but I need to group them by 'External' and 'Internal'.&lt;/P&gt;&lt;P&gt;The 'External' rooms are fields:&amp;nbsp; CTMOB; MSPI; XSPI; CSPI; CTMOB2&lt;/P&gt;&lt;P&gt;The 'Internal' rooms are fields:&amp;nbsp; RMR2; SMR1; SMR2; SMR3; SMR4; SMR5&lt;/P&gt;&lt;P&gt;All other rooms can be grouped as 'Other Rooms'.&lt;/P&gt;&lt;P&gt;How can I do this in the load script??&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:53:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748382#M453456</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2024-11-15T23:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748383#M453457</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/23929"&gt;@jlampard40&lt;/a&gt;&amp;nbsp; you can use Mapping table like this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;MapField:
mapping load * inline [
FieldtoMap,Mapby
CTMOB,External
MSPI,External
XSPI,External
CSPI,External
CTMOB2,External
RMR2,Internal
SMR1,Internal
SMR2,Internal
SMR3,Internal
SMR4,Internal
SMR5,Internal
];

YOURTABLE:

load 
Applymap('MapField',FieldtoMap,'Other Rooms') as New_Field,
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 10:09:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748383#M453457</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-09-30T10:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748390#M453458</link>
      <description>&lt;P&gt;Where would I put this in the load script Taoufiq?&amp;nbsp; This is my load script (shortened a little):&lt;/P&gt;&lt;P&gt;Directory;&lt;BR /&gt;LOAD&lt;BR /&gt;AD_Referring_Location as Referring_Location,&lt;BR /&gt;AD_Data as Activity_or_Demand,&lt;BR /&gt;AD_Booked,&lt;BR /&gt;AD_Room as Room,&lt;BR /&gt;AD_Reported_By as Reported_By,&lt;BR /&gt;AD_Demand_Group as Demand_Group,&lt;BR /&gt;AD_CY as Calendar_Year_R&lt;/P&gt;&lt;P&gt;FROM&lt;BR /&gt;[..\Python\DASH_AD.csv]&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 09:52:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748390#M453458</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2020-09-30T09:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748396#M453461</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/23929"&gt;@jlampard40&lt;/a&gt;&amp;nbsp; yes like :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;MapField:
mapping load * inline [
AD_Room,Mapby
CTMOB,External
MSPI,External
XSPI,External
CSPI,External
CTMOB2,External
RMR2,Internal
SMR1,Internal
SMR2,Internal
SMR3,Internal
SMR4,Internal
SMR5,Internal
];

Table:
Directory;

LOAD
AD_Referring_Location as Referring_Location,
AD_Data as Activity_or_Demand,
AD_Booked,
AD_Room as Room,
Applymap('MapField',AD_Room,'Other Rooms') as New_AD_Room,
AD_Reported_By as Reported_By,
AD_Demand_Group as Demand_Group,
AD_CY as Calendar_Year_R

FROM
[..\Python\DASH_AD.csv]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 10:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748396#M453461</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-09-30T10:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748445#M453467</link>
      <description>&lt;P&gt;Hi Taoufiq - that works really well.&amp;nbsp; What if I want to add a condition to this grouping, so that some scanners are external, some internal, some are external inpatient, some are external outpatient.&lt;/P&gt;&lt;P&gt;The dimensions are AD_Room and AD_PatientType&lt;/P&gt;&lt;P&gt;So, as before, the 'External' rooms are fields:&amp;nbsp; CTMOB; MSPI; XSPI; CSPI; CTMOB2&lt;/P&gt;&lt;P&gt;The 'Internal' rooms are fields:&amp;nbsp; RMR2; SMR1; SMR2; SMR3; SMR4; SMR5&lt;/P&gt;&lt;P&gt;But I also want to have external inpatient which are:&amp;nbsp; CTMOB; MSPI; XSPI; CSPI; CTMOB2 and patient type 'A' (from dimension AD_PatientType).&lt;/P&gt;&lt;P&gt;External Outpatient will be&amp;nbsp;CTMOB; MSPI; XSPI; CSPI; CTMOB2 and patient type 'B' (from dimension AD_PatientType).&lt;/P&gt;&lt;P&gt;All other rooms can be grouped as 'Other Rooms' again.&lt;/P&gt;&lt;P&gt;Many thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 12:27:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1748445#M453467</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2020-09-30T12:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1749969#M453533</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/23929"&gt;@jlampard40&lt;/a&gt;&amp;nbsp; sorry for the late, we don't receive notification if I'm not tagged.&lt;/P&gt;&lt;P&gt;can you share a sample data ? and the expected ?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 12:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-Load-Script/m-p/1749969#M453533</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-10-06T12:55:51Z</dc:date>
    </item>
  </channel>
</rss>

