<?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: Synthetic dimension with calculated measure - not working in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Synthetic-dimension-with-calculated-measure-not-working/m-p/2490105#M101893</link>
    <description>&lt;P&gt;I found a pretty good answer, but not a 100% the one I'm looking for:&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=_AvyITll9mM" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.youtube.com/watch?v=_AvyITll9mM&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This works for not dynamic filter. But if I want to have my count on CustomerID based on filter, it doesn't work. How can I adjust my script so that CustomerID's are filtered according to the Quarter and Years?:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;pick(Match(ValueList($(vCustomerTyp)),$( vCustomerTyp)),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct {&amp;lt; Quarter = {"&amp;lt;=$(=Max(Quarter))"}, Year = {"$(=Max(Year))"}, CustomerID = {"=Count(CustomerID) = 1"}&amp;gt;} CustomerID),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct {&amp;lt; Quarter = {"&amp;lt;=$(=Max(Quarter))"}, Year = {"$(=Max(Year))"}, CustomerID = {"=Count(CustomerID) = 2"}&amp;gt;} CustomerID),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct {&amp;lt; Quarter = {"&amp;lt;=$(=Max(Quarter))"}, Year = {"$(=Max(Year))"}, CustomerID = {"=Count(CustomerID) = 3"}&amp;gt;} CustomerID),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct {&amp;lt; Quarter = {"&amp;lt;=$(=Max(Quarter))"}, Year = {"$(=Max(Year))"}, CustomerID = {"=Count(CustomerID) = 4"}&amp;gt;} CustomerID),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct {&amp;lt; Quarter = {"&amp;lt;=$(=Max(Quarter))"}, Year = {"$(=Max(Year))"}, CustomerID = {"=Count(CustomerID) &amp;gt; 4"}&amp;gt;} CustomerID))&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2024 08:31:12 GMT</pubDate>
    <dc:creator>paperjam</dc:creator>
    <dc:date>2024-10-31T08:31:12Z</dc:date>
    <item>
      <title>Synthetic dimension with calculated measure - not working</title>
      <link>https://community.qlik.com/t5/App-Development/Synthetic-dimension-with-calculated-measure-not-working/m-p/2490080#M101890</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;
&lt;P&gt;I would like to get all the customers which made a purchase 1-time, 2-times, etc. YTD based on a quarter Filter. So basically the formula gets all the data up to the selected quarter. So far, so good. All my formulas are working:&lt;BR /&gt;&lt;BR /&gt;Count({&amp;lt;Quarter= {"&amp;lt;=$(=Max(Quarter))"}, Year= {"$(=Max(Year))"}&amp;gt;} If(Aggr(Count({&amp;lt;Quarter= {"&amp;lt;=$(=Max(Quarter))"}, Year= {"$(=Max(Year))"}&amp;gt;} CustomerID), CustomerID) = 1, CustomerID))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Count({&amp;lt;Quarter= {"&amp;lt;=$(=Max(Quarter))"}, Year= {"$(=Max(Year))"}&amp;gt;} If(Aggr(Count({&amp;lt;Quarter= {"&amp;lt;=$(=Max(Quarter))"}, Year= {"$(=Max(Year))"}&amp;gt;} CustomerID), CustomerID) = 2, CustomerID))&lt;BR /&gt;&lt;BR /&gt;etc.&lt;BR /&gt;&lt;BR /&gt;But if i want to combine this logic with a synthetic dimenos (via ValueList), only 1-time customer works, but not 2-time customer etc.:&lt;BR /&gt;&lt;BR /&gt;Works:&lt;BR /&gt;If(&lt;BR /&gt;ValueList('1-time customer', '2-time customer', '3-time customer', '4-time customer', '4-time+ customer') = '1-time customer', &lt;BR /&gt;Count(&lt;BR /&gt;{&amp;lt;Quarter= {"&amp;lt;=$(=Max(Quarter))"}, Year= {"$(=Max(Year))"}&amp;gt;} &lt;BR /&gt;If(&lt;BR /&gt;Aggr(&lt;BR /&gt;Count({&amp;lt;Quarter= {"&amp;lt;=$(=Max(Quarter))"}, Year= {"$(=Max(Year))"}&amp;gt;} CustomerID), &lt;BR /&gt;CustomerID&lt;BR /&gt;) = 1, &lt;BR /&gt;CustomerID&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Doesn't work:&lt;BR /&gt;If(&lt;BR /&gt;ValueList('1-time customer', '2-time customer', '3-time customer', '4-time customer', '4-time+ customer') = '2-time customer', &lt;BR /&gt;Count(&lt;BR /&gt;{&amp;lt;Quarter= {"&amp;lt;=$(=Max(Quarter))"}, Year= {"$(=Max(Year))"}&amp;gt;} &lt;BR /&gt;If(&lt;BR /&gt;Aggr(&lt;BR /&gt;Count({&amp;lt;Quarter= {"&amp;lt;=$(=Max(Quarter))"}, Year= {"$(=Max(Year))"}&amp;gt;} CustomerID), &lt;BR /&gt;CustomerID&lt;BR /&gt;) = 2, &lt;BR /&gt;CustomerID&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Doesn't seem logic to me that one time it works and the other time with exact the same logic it doesn't....&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 07:13:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Synthetic-dimension-with-calculated-measure-not-working/m-p/2490080#M101890</guid>
      <dc:creator>paperjam</dc:creator>
      <dc:date>2024-10-31T07:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic dimension with calculated measure - not working</title>
      <link>https://community.qlik.com/t5/App-Development/Synthetic-dimension-with-calculated-measure-not-working/m-p/2490105#M101893</link>
      <description>&lt;P&gt;I found a pretty good answer, but not a 100% the one I'm looking for:&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=_AvyITll9mM" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.youtube.com/watch?v=_AvyITll9mM&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This works for not dynamic filter. But if I want to have my count on CustomerID based on filter, it doesn't work. How can I adjust my script so that CustomerID's are filtered according to the Quarter and Years?:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;pick(Match(ValueList($(vCustomerTyp)),$( vCustomerTyp)),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct {&amp;lt; Quarter = {"&amp;lt;=$(=Max(Quarter))"}, Year = {"$(=Max(Year))"}, CustomerID = {"=Count(CustomerID) = 1"}&amp;gt;} CustomerID),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct {&amp;lt; Quarter = {"&amp;lt;=$(=Max(Quarter))"}, Year = {"$(=Max(Year))"}, CustomerID = {"=Count(CustomerID) = 2"}&amp;gt;} CustomerID),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct {&amp;lt; Quarter = {"&amp;lt;=$(=Max(Quarter))"}, Year = {"$(=Max(Year))"}, CustomerID = {"=Count(CustomerID) = 3"}&amp;gt;} CustomerID),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct {&amp;lt; Quarter = {"&amp;lt;=$(=Max(Quarter))"}, Year = {"$(=Max(Year))"}, CustomerID = {"=Count(CustomerID) = 4"}&amp;gt;} CustomerID),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct {&amp;lt; Quarter = {"&amp;lt;=$(=Max(Quarter))"}, Year = {"$(=Max(Year))"}, CustomerID = {"=Count(CustomerID) &amp;gt; 4"}&amp;gt;} CustomerID))&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 08:31:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Synthetic-dimension-with-calculated-measure-not-working/m-p/2490105#M101893</guid>
      <dc:creator>paperjam</dc:creator>
      <dc:date>2024-10-31T08:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic dimension with calculated measure - not working</title>
      <link>https://community.qlik.com/t5/App-Development/Synthetic-dimension-with-calculated-measure-not-working/m-p/2490572#M101947</link>
      <description>&lt;P&gt;I think I would use an approach like:&lt;/P&gt;
&lt;P&gt;class(aggr({ Set } count({ Set } Field), Dim1, Dim2), $(var))&lt;/P&gt;
&lt;P&gt;whereby the variable var provides a dynamically adjusting of the cluster-size.&lt;/P&gt;
&lt;P&gt;Class() is dual() and you may embed it in a pick-logic like:&lt;/P&gt;
&lt;P&gt;pick(match(num(class()), 1, 2, 3), 'a', 'b', 'c')&lt;/P&gt;
&lt;P&gt;The class() bucket-size is always equally to the specified second parameter - maybe the mentioned variable - but by embedding the count() into a rangemin(rangemax()) you may also fetch the lower/upper outliers.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 12:36:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Synthetic-dimension-with-calculated-measure-not-working/m-p/2490572#M101947</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-11-04T12:36:49Z</dc:date>
    </item>
  </channel>
</rss>

