<?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: Set Analysis instead of Pick in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624610#M446020</link>
    <description>&lt;P&gt;I think that assumption is more often true, but I would suggest you to test it out for yourself.... Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum(If(StockColor = SaleColor and SaleSize = StockSize, StockQuantity))&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 17 Sep 2019 11:24:09 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-09-17T11:24:09Z</dc:date>
    <item>
      <title>Set Analysis instead of Pick</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1623923#M445972</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please see data example below.&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;ProductGroup,&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;StockColor,&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;StockSize,&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;StockQuantity,&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup1,&lt;/TD&gt;&lt;TD&gt;Green,&lt;/TD&gt;&lt;TD&gt;40,&lt;/TD&gt;&lt;TD&gt;10,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup1,&lt;/TD&gt;&lt;TD&gt;Green,&lt;/TD&gt;&lt;TD&gt;41,&lt;/TD&gt;&lt;TD&gt;15,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup1,&lt;/TD&gt;&lt;TD&gt;Red,&lt;/TD&gt;&lt;TD&gt;40,&lt;/TD&gt;&lt;TD&gt;5,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup1,&lt;/TD&gt;&lt;TD&gt;Red,&lt;/TD&gt;&lt;TD&gt;41,&lt;/TD&gt;&lt;TD&gt;5,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup2,&lt;/TD&gt;&lt;TD&gt;Yellow,&lt;/TD&gt;&lt;TD&gt;Small,&lt;/TD&gt;&lt;TD&gt;5,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup2,&lt;/TD&gt;&lt;TD&gt;White,&lt;/TD&gt;&lt;TD&gt;Large,&lt;/TD&gt;&lt;TD&gt;15,&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;ProductGroup,&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;SalesProductName,&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;SalesColor,&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;SalesSize,&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;SalesQuantity,&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup1,&lt;/TD&gt;&lt;TD&gt;Shoes,&lt;/TD&gt;&lt;TD&gt;Green,&lt;/TD&gt;&lt;TD&gt;40,&lt;/TD&gt;&lt;TD&gt;3,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup1,&lt;/TD&gt;&lt;TD&gt;Shoes,&lt;/TD&gt;&lt;TD&gt;Green,&lt;/TD&gt;&lt;TD&gt;41,&lt;/TD&gt;&lt;TD&gt;5,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup1,&lt;/TD&gt;&lt;TD&gt;Shoes,&lt;/TD&gt;&lt;TD&gt;Red,&lt;/TD&gt;&lt;TD&gt;40,&lt;/TD&gt;&lt;TD&gt;2,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup1,&lt;/TD&gt;&lt;TD&gt;Shoes,&lt;/TD&gt;&lt;TD&gt;Red,&lt;/TD&gt;&lt;TD&gt;41,&lt;/TD&gt;&lt;TD&gt;2,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup2,&lt;/TD&gt;&lt;TD&gt;Toy,&lt;/TD&gt;&lt;TD&gt;,&lt;/TD&gt;&lt;TD&gt;,&lt;/TD&gt;&lt;TD&gt;11,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProductGroup2,&lt;/TD&gt;&lt;TD&gt;Toy,&lt;/TD&gt;&lt;TD&gt;,&lt;/TD&gt;&lt;TD&gt;,&lt;/TD&gt;&lt;TD&gt;8,&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the current data model these two Fact tables are joined by&amp;nbsp;&lt;STRONG&gt;ProductGroup&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;However in a chart it should be presented by all dimensions (Group, ProductName, Color, Size) with correct values per row for&amp;nbsp;&lt;STRONG&gt;StockQuantity &lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;SalesQuantity&lt;/STRONG&gt; measures.&lt;/P&gt;&lt;P&gt;Some products doesn't have Color and Size therefore key cannot be combined using these columns.&lt;/P&gt;&lt;P&gt;Existing data model is complex. I am thinking to move Products where available Size and Color in a different Table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am curious whether is possible to create an expression with only Set Analysis (e.g. {&amp;lt;&lt;STRONG&gt;StockColor&lt;/STRONG&gt;&lt;STRONG&gt;=P(SalesColor),&amp;nbsp;StockSize=P(SalesSize)&lt;/STRONG&gt;&amp;gt;} or something like {&amp;lt;&lt;STRONG&gt;StockColor&lt;/STRONG&gt;&lt;STRONG&gt;={"=Only(SalesColor)"},&amp;nbsp;StockSize={"=Only(SalesSize)"}&lt;/STRONG&gt;&amp;gt;} )&lt;/P&gt;&lt;P&gt;It doesn't work properly.&lt;/P&gt;&lt;P&gt;In addition I have created the expression with Pick function where result as expected.&lt;/P&gt;&lt;P&gt;Pick(Match(StockColor,'Green','Red')&lt;BR /&gt;// Green&lt;BR /&gt;,Pick(Match(StockSize,'40','41')&lt;BR /&gt;,Sum({&amp;lt;StockColor={'Green'}, SalesSize={'40'}&amp;gt;}StockQuantity) // 40&lt;BR /&gt;,Sum({&amp;lt;StockColor={'Green'}, SalesSize={'41'}&amp;gt;}StockQuantity) // 41&lt;BR /&gt;)&lt;BR /&gt;// Red&lt;BR /&gt;,Pick(Match(StockSize,'40','41')&lt;BR /&gt;,Sum({&amp;lt;StockColor={'Red'}, SalesSize={'40'}&amp;gt;}StockQuantity) // 40&lt;BR /&gt;,Sum({&amp;lt;StockColor={'Red'}, SalesSize={'41'}&amp;gt;}StockQuantity) // 41&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="clipboard_image_2.png" style="width: 399px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/19227i5FD6CD00400F99FA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clipboard_image_2.png" alt="clipboard_image_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My question is how to replace Pick function with Set Analysis hence leave only one formula?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2019 20:50:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1623923#M445972</guid>
      <dc:creator>Yevhenii_Senko</dc:creator>
      <dc:date>2019-09-14T20:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis instead of Pick</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624377#M446000</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please take a look at my post?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 19:33:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624377#M446000</guid>
      <dc:creator>Yevhenii_Senko</dc:creator>
      <dc:date>2019-09-16T19:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis instead of Pick</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624604#M446017</link>
      <description>&lt;P&gt;I don't think this can be done using set analysis... one option which might work is to use an if statement.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 11:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624604#M446017</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-09-17T11:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis instead of Pick</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624609#M446019</link>
      <description>&lt;P&gt;Thanks Sunny, I thought the same regarding to Set Analysis.&lt;/P&gt;&lt;P&gt;From different discussions I found pick should work faster than if. Could you please confirm this assumption?&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 11:21:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624609#M446019</guid>
      <dc:creator>Yevhenii_Senko</dc:creator>
      <dc:date>2019-09-17T11:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis instead of Pick</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624610#M446020</link>
      <description>&lt;P&gt;I think that assumption is more often true, but I would suggest you to test it out for yourself.... Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum(If(StockColor = SaleColor and SaleSize = StockSize, StockQuantity))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 17 Sep 2019 11:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624610#M446020</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-09-17T11:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis instead of Pick</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624617#M446021</link>
      <description>Thanks much! I will try it!&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Sep 2019 11:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624617#M446021</guid>
      <dc:creator>Yevhenii_Senko</dc:creator>
      <dc:date>2019-09-17T11:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis instead of Pick</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624717#M446026</link>
      <description>&lt;P&gt;I have tested both approaches where identified longer calc time with using pick function.&lt;/P&gt;&lt;P&gt;This testing is acceptable for the existed data model and perhaps might show another results in a different app.&lt;/P&gt;&lt;P&gt;BTW is there only one option to check object resources in the document properties? I mean without using the Document Analyzer. Is it possible to create a chart where to present resources consuming per sheet/objects?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 14:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624717#M446026</guid>
      <dc:creator>Yevhenii_Senko</dc:creator>
      <dc:date>2019-09-17T14:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis instead of Pick</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624719#M446027</link>
      <description>&lt;P&gt;Document Analyzer and Document properties are the only two places I am aware of where you can check this.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 14:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-instead-of-Pick/m-p/1624719#M446027</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-09-17T14:24:51Z</dc:date>
    </item>
  </channel>
</rss>

