<?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: Mapping expression output in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Mapping-expression-output/m-p/1525788#M599857</link>
    <description>&lt;P&gt;You could use an approach like this one:&lt;/P&gt;&lt;P&gt;Mapping_tab:&lt;BR /&gt;&lt;STRONG&gt;Load Min + ((iterno() - 1) / 100) as Result, Group while Min + ((iterno() - 1) / 100) &amp;lt;= Max;&lt;/STRONG&gt;&lt;BR /&gt;Load * inline [&lt;BR /&gt;Min,Max,Group&lt;BR /&gt;0,0.01,1&lt;BR /&gt;0.01,0.03,2&lt;BR /&gt;0.03,0.04,3&lt;BR /&gt;0.04,0.08,4&lt;BR /&gt;0.08,0.13,5&lt;BR /&gt;0.13,0.18,6&lt;BR /&gt;0.18,0.23,7&lt;BR /&gt;0.23,0.28,8&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;to extend the mapping-table to discrete values and within the expression you used a pick(match()) with adhoc-variables to return the Group, for example with:&lt;/P&gt;&lt;P&gt;pick(match(floor(sum(Rate* Balances)/sum(Balances), 0.01), $(=concat(Result, ',')), $(=concat(Group, ',')))&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jan 2019 12:08:29 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2019-01-03T12:08:29Z</dc:date>
    <item>
      <title>Mapping expression output</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-expression-output/m-p/1525727#M599855</link>
      <description>Dear all,&lt;BR /&gt;&lt;BR /&gt;I have been reading up on many different questions where people are trying to map values. But I wasn't able to find something close to what I need.&lt;BR /&gt;&lt;BR /&gt;I have an expression in a pivot table that calculates the weighted average of a metric ie.&lt;BR /&gt;&lt;BR /&gt;sum(Rate* Balances)/sum(Balances)&lt;BR /&gt;&lt;BR /&gt;I would like to map the output of this expression to a table I have. The table is like this.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mapping_tab:&lt;BR /&gt;&lt;BR /&gt;Load * inline [&lt;BR /&gt;&lt;BR /&gt;Min,Max,Group&lt;BR /&gt;&lt;BR /&gt;0,0.01,1&lt;BR /&gt;&lt;BR /&gt;0.01,0.03,2&lt;BR /&gt;&lt;BR /&gt;0.03,0.04,3&lt;BR /&gt;&lt;BR /&gt;0.04,0.08,4&lt;BR /&gt;&lt;BR /&gt;0.08,0.13,5&lt;BR /&gt;&lt;BR /&gt;0.13,0.18,6&lt;BR /&gt;&lt;BR /&gt;0.18,0.23,7&lt;BR /&gt;&lt;BR /&gt;0.23,0.28,8&lt;BR /&gt;&lt;BR /&gt;]&lt;BR /&gt;&lt;BR /&gt;So if the expression result is between 0.13 and 0.18 then I want the expression to output 6.&lt;BR /&gt;&lt;BR /&gt;Any help is more than appreciated.&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Sat, 16 Nov 2024 04:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-expression-output/m-p/1525727#M599855</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2024-11-16T04:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping expression output</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-expression-output/m-p/1525781#M599856</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;If&amp;nbsp;expression&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;sum(Rate* Balances)/sum(Balances)&lt;/STRONG&gt; is possible to calculate in script, you can use intervalmatch function with your map table. Pls ref to manuals:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/ScriptPrefixes/IntervalMatch.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/ScriptPrefixes/IntervalMatch.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/LoadData/matching-intervals-to-discrete-data.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/LoadData/matching-intervals-to-discrete-data.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Else, in expression, you need to use something like:&lt;/P&gt;&lt;P&gt;If(a&amp;gt;x1 and a&amp;lt;y1, 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; if(&lt;SPAN&gt;a&amp;gt;x2 and a&amp;lt;y2, 2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(a&amp;gt;x2 and a&amp;lt;y2, 3, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(...))&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;But it&amp;nbsp;will be very slow&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 11:58:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-expression-output/m-p/1525781#M599856</guid>
      <dc:creator>Zhandos_Shotan</dc:creator>
      <dc:date>2019-01-03T11:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping expression output</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-expression-output/m-p/1525788#M599857</link>
      <description>&lt;P&gt;You could use an approach like this one:&lt;/P&gt;&lt;P&gt;Mapping_tab:&lt;BR /&gt;&lt;STRONG&gt;Load Min + ((iterno() - 1) / 100) as Result, Group while Min + ((iterno() - 1) / 100) &amp;lt;= Max;&lt;/STRONG&gt;&lt;BR /&gt;Load * inline [&lt;BR /&gt;Min,Max,Group&lt;BR /&gt;0,0.01,1&lt;BR /&gt;0.01,0.03,2&lt;BR /&gt;0.03,0.04,3&lt;BR /&gt;0.04,0.08,4&lt;BR /&gt;0.08,0.13,5&lt;BR /&gt;0.13,0.18,6&lt;BR /&gt;0.18,0.23,7&lt;BR /&gt;0.23,0.28,8&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;to extend the mapping-table to discrete values and within the expression you used a pick(match()) with adhoc-variables to return the Group, for example with:&lt;/P&gt;&lt;P&gt;pick(match(floor(sum(Rate* Balances)/sum(Balances), 0.01), $(=concat(Result, ',')), $(=concat(Group, ',')))&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 12:08:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-expression-output/m-p/1525788#M599857</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-01-03T12:08:29Z</dc:date>
    </item>
  </channel>
</rss>

