<?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 Dynamic Measure based on Dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-Measure-based-on-Dimension/m-p/2473555#M99899</link>
    <description>&lt;P&gt;Hi Qlikkies,&lt;/P&gt;
&lt;P&gt;I have data in the below format&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="3" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl64" style="height: 15.0pt; width: 48pt;"&gt;Product&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="border-left: none; width: 48pt;"&gt;Year&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="border-left: none; width: 48pt;"&gt;Sales&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2021&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2023&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2024&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2021&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2023&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2024&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to calculate Growth %age at Product Level where the Initial Sales should be greater than Zero. I am looking for solution that can be done at front-end as there is lot of data &amp;amp; I can't drop the rows with Sales as 0.&lt;/P&gt;
&lt;P&gt;The desired o/p should be&lt;/P&gt;
&lt;TABLE width="289"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;Product&lt;/TD&gt;
&lt;TD width="78"&gt;Initial Non Zero Value&lt;/TD&gt;
&lt;TD width="74"&gt;Final Non Zero Value&lt;/TD&gt;
&lt;TD width="73"&gt;% Growth&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;P1&lt;/TD&gt;
&lt;TD&gt;20&lt;/TD&gt;
&lt;TD&gt;50&lt;/TD&gt;
&lt;TD&gt;(50-20)/20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;P2&lt;/TD&gt;
&lt;TD&gt;10&lt;/TD&gt;
&lt;TD&gt;30&lt;/TD&gt;
&lt;TD&gt;(30-10)/10&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here for P1 , the initial non zero value will be from 2021 but for P2 the initial non zero value would be from 2022&lt;/P&gt;
&lt;P&gt;Please let me know in case of any queries.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jul 2024 14:08:16 GMT</pubDate>
    <dc:creator>ujjwalraja</dc:creator>
    <dc:date>2024-07-29T14:08:16Z</dc:date>
    <item>
      <title>Dynamic Measure based on Dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Measure-based-on-Dimension/m-p/2473555#M99899</link>
      <description>&lt;P&gt;Hi Qlikkies,&lt;/P&gt;
&lt;P&gt;I have data in the below format&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="3" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl64" style="height: 15.0pt; width: 48pt;"&gt;Product&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="border-left: none; width: 48pt;"&gt;Year&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="border-left: none; width: 48pt;"&gt;Sales&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2021&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2023&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2024&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2021&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2023&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;P2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2024&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to calculate Growth %age at Product Level where the Initial Sales should be greater than Zero. I am looking for solution that can be done at front-end as there is lot of data &amp;amp; I can't drop the rows with Sales as 0.&lt;/P&gt;
&lt;P&gt;The desired o/p should be&lt;/P&gt;
&lt;TABLE width="289"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;Product&lt;/TD&gt;
&lt;TD width="78"&gt;Initial Non Zero Value&lt;/TD&gt;
&lt;TD width="74"&gt;Final Non Zero Value&lt;/TD&gt;
&lt;TD width="73"&gt;% Growth&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;P1&lt;/TD&gt;
&lt;TD&gt;20&lt;/TD&gt;
&lt;TD&gt;50&lt;/TD&gt;
&lt;TD&gt;(50-20)/20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;P2&lt;/TD&gt;
&lt;TD&gt;10&lt;/TD&gt;
&lt;TD&gt;30&lt;/TD&gt;
&lt;TD&gt;(30-10)/10&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here for P1 , the initial non zero value will be from 2021 but for P2 the initial non zero value would be from 2022&lt;/P&gt;
&lt;P&gt;Please let me know in case of any queries.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 14:08:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Measure-based-on-Dimension/m-p/2473555#M99899</guid>
      <dc:creator>ujjwalraja</dc:creator>
      <dc:date>2024-07-29T14:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Measure based on Dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Measure-based-on-Dimension/m-p/2473568#M99902</link>
      <description>&lt;P&gt;One idea is to use an if check in the measure to check if the value is &amp;gt; 0. You will also need remove the "Include Zero Valeus" for the table.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is how to add the If check:&lt;BR /&gt;If(Sum({&amp;lt;Year={"$(=Min(Year))"}&amp;gt;}Sales)&amp;gt;0,&lt;BR /&gt;(Sum({&amp;lt;Year={"$(=Max(Year))"}&amp;gt;}Sales)-Sum({&amp;lt;Year={"$(=Min(Year))"}&amp;gt;}Sales))/Sum({&amp;lt;Year={"$(=Min(Year))"}&amp;gt;}Sales))&lt;BR /&gt;&lt;BR /&gt;You could also build this check in the load script, you don't need to drop the 0 from the fact table, just flag the products you should ignore or build another table with the data you want to show and link by ProductID.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 13:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Measure-based-on-Dimension/m-p/2473568#M99902</guid>
      <dc:creator>TonySapede</dc:creator>
      <dc:date>2024-07-29T13:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Measure based on Dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Measure-based-on-Dimension/m-p/2473572#M99904</link>
      <description>&lt;P&gt;Thanks Tony,&lt;/P&gt;
&lt;P&gt;Apologies If I was not clear, The Idea is to get Initial Value for Product P2 in this case bypassing 0, The Solution which you proposed is giving nulls for P2 but it should pick values of next minimum year where the value is non zero.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ujjwalraja_0-1722261811261.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/170027i68386A7E022F171C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ujjwalraja_0-1722261811261.png" alt="ujjwalraja_0-1722261811261.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 14:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Measure-based-on-Dimension/m-p/2473572#M99904</guid>
      <dc:creator>ujjwalraja</dc:creator>
      <dc:date>2024-07-29T14:04:42Z</dc:date>
    </item>
  </channel>
</rss>

