<?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 Assign a value to more than one category in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2486967#M101445</link>
    <description>&lt;P&gt;Hello i'm trying to group sizes and the logic is something like this&amp;nbsp;&lt;BR /&gt;Case &lt;BR /&gt;&lt;SPAN&gt; WHEN SIZE LIKE '251 - 499ML' AND PACK_SIZE IN ('300ml', '320ml', '330ml', '3960ml') AND Char_3='PLASTIC BOTTLE' THEN '300ML - 330ML'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;WHEN SIZE LIKE '251 - 499ML' AND PACK_SIZE IN ('300ml', '320ml', '330ml', '3960ml','400ml', '450ml') AND Char_3='PLASTIC BOTTLE' THEN '250ML - 500ML'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;else SIZE END AS SIZE,&lt;/P&gt;
&lt;P&gt;in short i want the&amp;nbsp;&lt;SPAN&gt; '300ML - 330ML' inside&amp;nbsp; '250ML - 500ML' as well but doing it like this gets it excluded how can i address the problem&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/149113" target="_blank"&gt;@MatheusC&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 20:51:11 GMT</pubDate>
    <dc:creator>RyugaHideki</dc:creator>
    <dc:date>2024-11-15T20:51:11Z</dc:date>
    <item>
      <title>Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2486967#M101445</link>
      <description>&lt;P&gt;Hello i'm trying to group sizes and the logic is something like this&amp;nbsp;&lt;BR /&gt;Case &lt;BR /&gt;&lt;SPAN&gt; WHEN SIZE LIKE '251 - 499ML' AND PACK_SIZE IN ('300ml', '320ml', '330ml', '3960ml') AND Char_3='PLASTIC BOTTLE' THEN '300ML - 330ML'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;WHEN SIZE LIKE '251 - 499ML' AND PACK_SIZE IN ('300ml', '320ml', '330ml', '3960ml','400ml', '450ml') AND Char_3='PLASTIC BOTTLE' THEN '250ML - 500ML'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;else SIZE END AS SIZE,&lt;/P&gt;
&lt;P&gt;in short i want the&amp;nbsp;&lt;SPAN&gt; '300ML - 330ML' inside&amp;nbsp; '250ML - 500ML' as well but doing it like this gets it excluded how can i address the problem&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/149113" target="_blank"&gt;@MatheusC&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 20:51:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2486967#M101445</guid>
      <dc:creator>RyugaHideki</dc:creator>
      <dc:date>2024-11-15T20:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487043#M101451</link>
      <description>&lt;P&gt;&lt;BR /&gt;The issue you're facing is due to the order of the CASE statements. The first WHEN condition that evaluates to true will be the result, and subsequent conditions will be ignored.&lt;/P&gt;
&lt;P&gt;To include '300ML - 330ML' within '250ML - 500ML', you need to reorder the CASE statements, putting the more specific condition ('300ML - 330ML') after the broader condition ('250ML - 500ML'). This way, if a value matches the '300ML - 330ML' condition, it will be assigned that label. Otherwise, it will be evaluated against the '250ML - 500ML' condition.&lt;/P&gt;
&lt;P&gt;Here's the updated logic:&lt;/P&gt;
&lt;P&gt;CASE&lt;BR /&gt;WHEN SIZE LIKE '251 - 499ML' AND PACK_SIZE IN ('300ml', '320ml', '330ml', '3960ml', '400ml', '450ml') AND Char_3='PLASTIC BOTTLE' THEN '250ML - 500ML'&lt;BR /&gt;WHEN SIZE LIKE '251 - 499ML' AND PACK_SIZE IN ('300ml', '320ml', '330ml', '3960ml') AND Char_3='PLASTIC BOTTLE' THEN '300ML - 330ML'&lt;BR /&gt;ELSE SIZE&lt;BR /&gt;END AS SIZE&lt;/P&gt;
&lt;DIV id="highlighter--hover-tools" style="display: none;"&gt;
&lt;DIV id="highlighter--hover-tools--container"&gt;
&lt;DIV class="highlighter--icon highlighter--icon-copy" title="Copy"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="highlighter--icon highlighter--icon-change-color" title="Change Color"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="highlighter--icon highlighter--icon-delete" title="Delete"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 15 Oct 2024 10:47:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487043#M101451</guid>
      <dc:creator>AnsweringTuring</dc:creator>
      <dc:date>2024-10-15T10:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487046#M101452</link>
      <description>&lt;P&gt;As long as i know overlapping of groups/Bucket not possible. if you write&amp;nbsp; in code in Qlik should not appear in Calculated field. there should be additional condition.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 11:11:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487046#M101452</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2024-10-15T11:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487092#M101457</link>
      <description>&lt;P&gt;the problem with that is that it will exclude 300-330 from 250-500&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 13:22:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487092#M101457</guid>
      <dc:creator>RyugaHideki</dc:creator>
      <dc:date>2024-10-15T13:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487093#M101458</link>
      <description>&lt;P&gt;I think so too, i was thinking of union or something but i do not know how to implement it&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 13:23:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487093#M101458</guid>
      <dc:creator>RyugaHideki</dc:creator>
      <dc:date>2024-10-15T13:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487118#M101463</link>
      <description>&lt;P&gt;It looks like you have access to the data load editor.&amp;nbsp; If this were me I might create two different buckets&amp;nbsp; using two different case statements.&amp;nbsp; One case statement would address once bucketing condition, and another case statement would address another bucketing condition.&amp;nbsp; You could then roll up the various buckets to your needed reporting requirements in different ways:&amp;nbsp; Maybe something like this using a nested select statement:&lt;/P&gt;
&lt;P&gt;Select&amp;nbsp; &amp;lt;fields with the bucket1 and bucket2, specialized groups derived from bucket1, bucket 2, and different supporting metadata, such as product, etc.&amp;gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;from (&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Select &amp;lt;various fields including product and other metadata&amp;gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case statement one that created one bucket of data as bucket1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case statement two that created a separate bucket of data as bucket2&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;from ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;) NestedSelectAlias&lt;/P&gt;
&lt;P&gt;This would allow a single product to appear in more than one bucket at once, and you could use each bucket to meet the needs of your various different groupings in analytic displays.&amp;nbsp; &amp;nbsp;You are not necessarily limited to just 2 buckets.&amp;nbsp; How may ways do you need to chop up this data?&amp;nbsp; And you can return to add more buckets later without impacting existing analytics.&amp;nbsp; &amp;nbsp;Also note that you get better performance when you create buckets in load scripts than in the analytics itself.&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 14:06:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487118#M101463</guid>
      <dc:creator>BuildItStrong</dc:creator>
      <dc:date>2024-10-15T14:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487281#M101499</link>
      <description>&lt;P&gt;if i get you right you want to do something similar to this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;select&lt;/P&gt;
&lt;P&gt;A.year,&lt;/P&gt;
&lt;P&gt;A.PRODUCT,&lt;/P&gt;
&lt;P&gt;case when A.size like etc.. as A.SIZE from&lt;/P&gt;
&lt;P&gt;(select YEAR,&lt;/P&gt;
&lt;P&gt;PRODUCT,&lt;/P&gt;
&lt;P&gt;case when size etc as size) A&lt;/P&gt;
&lt;P&gt;like this ?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 07:05:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487281#M101499</guid>
      <dc:creator>RyugaHideki</dc:creator>
      <dc:date>2024-10-16T07:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487369#M101518</link>
      <description>&lt;P&gt;In your example, there is only one case statement in the subselect.&amp;nbsp; If you want a single record to appear in more than one bucket (presumably because you want to analyze it in more than one way), then you need more than one bucket.&amp;nbsp; Focusing on the multiple buckets, it might look closer to:&lt;/P&gt;
&lt;P&gt;Select&lt;/P&gt;
&lt;P&gt;A.year,&lt;/P&gt;
&lt;P&gt;A.PRODUCT,&lt;/P&gt;
&lt;P&gt;A derived field that uses functions and equations to manipulate the values of SizeBucket1, SizeBucket2 as necessary&lt;/P&gt;
&lt;P&gt;from&lt;/P&gt;
&lt;P&gt;// Start of Subselect...&lt;/P&gt;
&lt;P&gt;(select YEAR,&lt;/P&gt;
&lt;P&gt;PRODUCT,&lt;/P&gt;
&lt;P&gt;case when size etc as SizeBucket1&lt;/P&gt;
&lt;P&gt;case when size etc as Sizebucket2) A&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the Subselect to develop your various buckets in the lowest grain that you will need in your analysis.&amp;nbsp; Pass the data from the Subselect into the upper select to perform any complex calculations needed from those lowest grain buckets.&amp;nbsp; By performing the case statements in the subselect, you can manipulate the results of those case statements as though they were fields in the upper select.&amp;nbsp; Using this technique you can perform complex processing of your multi-bucket data.&amp;nbsp; Most SQL data engines will support case statements and subselects.&amp;nbsp; Depending upon your specific needs, you may be able to achieve your goals with a simple collection of different buckets, and you may not need the select - subselect approach.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 12:57:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2487369#M101518</guid>
      <dc:creator>BuildItStrong</dc:creator>
      <dc:date>2024-10-16T12:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2488109#M101623</link>
      <description>&lt;P&gt;i understand that appraoch and it's something i've thought of doing actually but it'll be an inconvience to have two size fields even if i concatenate the fields, thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 07:48:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2488109#M101623</guid>
      <dc:creator>RyugaHideki</dc:creator>
      <dc:date>2024-10-21T07:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2488173#M101635</link>
      <description>&lt;P&gt;I am very interested in hearing about your final solution.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 12:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2488173#M101635</guid>
      <dc:creator>BuildItStrong</dc:creator>
      <dc:date>2024-10-21T12:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a value to more than one category</title>
      <link>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2488187#M101636</link>
      <description>&lt;P&gt;i just decided to put a second reading in another sheet one has the sizes needed the first time and the second has the sizes that need to be combined in another way&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there probably is different approaches to this for instance i could just alter the data from the database and create the category i want in the end similar approaches to this since we cannot double the elements cause the margin of error is really thin&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 13:03:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assign-a-value-to-more-than-one-category/m-p/2488187#M101636</guid>
      <dc:creator>RyugaHideki</dc:creator>
      <dc:date>2024-10-21T13:03:53Z</dc:date>
    </item>
  </channel>
</rss>

