<?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 measure to dimension in load script? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/measure-to-dimension-in-load-script/m-p/1821399#M67334</link>
    <description>&lt;P&gt;My DB contains fields item, revenue and quantity. Inside the app, it's no problem to calculate price of every item by simply dividing sum(revenue)/sum(quantity), but it will be a measure.&lt;/P&gt;&lt;P&gt;What if I need price as a dimension? can I write same expression in my load script? How do I specify aggregation level? Let's say I have one more field, i.e. Country. and I have country 1, country 2. then, I would need price 1 for country 1-item1 and price 2 for country2 - item 1&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jul 2021 11:19:54 GMT</pubDate>
    <dc:creator>DyadyaFedor</dc:creator>
    <dc:date>2021-07-12T11:19:54Z</dc:date>
    <item>
      <title>measure to dimension in load script?</title>
      <link>https://community.qlik.com/t5/App-Development/measure-to-dimension-in-load-script/m-p/1821399#M67334</link>
      <description>&lt;P&gt;My DB contains fields item, revenue and quantity. Inside the app, it's no problem to calculate price of every item by simply dividing sum(revenue)/sum(quantity), but it will be a measure.&lt;/P&gt;&lt;P&gt;What if I need price as a dimension? can I write same expression in my load script? How do I specify aggregation level? Let's say I have one more field, i.e. Country. and I have country 1, country 2. then, I would need price 1 for country 1-item1 and price 2 for country2 - item 1&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 11:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/measure-to-dimension-in-load-script/m-p/1821399#M67334</guid>
      <dc:creator>DyadyaFedor</dc:creator>
      <dc:date>2021-07-12T11:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: measure to dimension in load script?</title>
      <link>https://community.qlik.com/t5/App-Development/measure-to-dimension-in-load-script/m-p/1821533#M67351</link>
      <description>&lt;P&gt;To aggregate, you use 'group by' on the fields:&lt;/P&gt;&lt;P&gt;PriceData:&lt;BR /&gt;Load&lt;BR /&gt;Country,&lt;BR /&gt;item,&lt;BR /&gt;Sum(revenue)/Sum(quantity) as Price&lt;BR /&gt;From SourceData&lt;BR /&gt;Group By Country, item;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 17:44:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/measure-to-dimension-in-load-script/m-p/1821533#M67351</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2021-07-12T17:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: measure to dimension in load script?</title>
      <link>https://community.qlik.com/t5/App-Development/measure-to-dimension-in-load-script/m-p/1822170#M67421</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Thank you Lauri. Your solution works.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I've just realized that in my case simply writing "revenue/quantity as price" without any grouping serves my purpose better.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But thank you very much anyway!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 17:32:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/measure-to-dimension-in-load-script/m-p/1822170#M67421</guid>
      <dc:creator>DyadyaFedor</dc:creator>
      <dc:date>2021-07-14T17:32:00Z</dc:date>
    </item>
  </channel>
</rss>

