<?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: Master Library &amp; Measures in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811907#M11232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't reference another measure from the formula of a different measure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what you can do is save the expression as a variable in the load editor using the SET script command as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vSales='sum(Sales)' ; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then be able to use the variable in the formula of a measure. Just make sure to use the dollar sign expansion syntax as follows to invoke the string of characters within the variable as a dynamic expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(Costs) /&amp;nbsp; $(vSales) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Nov 2014 01:11:05 GMT</pubDate>
    <dc:creator>JonnyPoole</dc:creator>
    <dc:date>2014-11-12T01:11:05Z</dc:date>
    <item>
      <title>Master Library &amp; Measures</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811906#M11231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone know if it's possible to use or reference a measure in the Master Items / Library in another measure? For example, I have a measure in the library that calculates a total spend from various products. I'd like to create another measure that uses this but it would be easier / better to simply be able to add something like Sum([Products_Total]) with "Products_Total" being my library measure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 11:25:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811906#M11231</guid>
      <dc:creator>jcampbell</dc:creator>
      <dc:date>2024-11-16T11:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Master Library &amp; Measures</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811907#M11232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't reference another measure from the formula of a different measure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what you can do is save the expression as a variable in the load editor using the SET script command as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vSales='sum(Sales)' ; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then be able to use the variable in the formula of a measure. Just make sure to use the dollar sign expansion syntax as follows to invoke the string of characters within the variable as a dynamic expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(Costs) /&amp;nbsp; $(vSales) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 01:11:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811907#M11232</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-11-12T01:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Master Library &amp; Measures</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811908#M11233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply Jonathan. I'm having an issue with this. I got the measure stored in a variable called "vHotelCost". My expression or measure is "Sum([Book Rate (Hotel)]) * Sum(Nights) * Sum(Guests)". So I tried using the following measure in my bar chart to display the percent of spend in each hotel city:&lt;/P&gt;&lt;P&gt;Sum([Book Rate (Hotel)]) * Sum(Nights) * Sum(Guests) /&amp;nbsp; $(vHotelCost)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That did not work. So I tried the following:&lt;/P&gt;&lt;P&gt;Sum([Book Rate (Hotel)]) * Sum(Nights) * Sum(Guests) / Sum(Total $(vHotelCost))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That did not work either. Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 22:41:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811908#M11233</guid>
      <dc:creator>jcampbell</dc:creator>
      <dc:date>2014-11-12T22:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Master Library &amp; Measures</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811909#M11234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joshua , i'm thinking something like this. Its a guess without working with your app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum( [Book Rate (Hotel)]&amp;nbsp; * Nights * Guests) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum( TOTAL [Book Rate (Hotel)]&amp;nbsp; * Nights * Guests)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If this works , then you can take the denominator or numerator 'as is' and set it in a variable in the load, reload and then update the expression to invoke the variable instead.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 01:29:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811909#M11234</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-11-13T01:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Master Library &amp; Measures</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811910#M11235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked perfectly. Thanks for the suggestion!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 15:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Library-Measures/m-p/811910#M11235</guid>
      <dc:creator>jcampbell</dc:creator>
      <dc:date>2014-11-13T15:01:52Z</dc:date>
    </item>
  </channel>
</rss>

