<?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 How to base set selection on another field when based-on field has no selection specified in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1778260#M60433</link>
    <description>&lt;P&gt;I am attempting to restrict use of a numeric field by values for a related date, if a value for another date have been selected, but if no selection exist for that referenced date field, then selection for the related date field should be ignored.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;count({$&amp;lt;RunStart_YrMo_num=RunStart_YrMo_PMCells&amp;gt;}distinct serial_number)&lt;/LI-CODE&gt;&lt;P&gt;Thus, if the user have selected a value for "RunStart_YrMo_PMCells", and there be "serial_number" values for that value in the date field "RunStart_YrMo_num" that is related to&amp;nbsp;"serial_number", I get results.&lt;/P&gt;&lt;P&gt;However, if the user have not specified any selection for&amp;nbsp;"RunStart_YrMo_PMCells", I want there to be no constraint.&amp;nbsp; T&lt;SPAN&gt;he code above returns nothing in this case, rather than everything.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;René V.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 21:05:46 GMT</pubDate>
    <dc:creator>plexpro52</dc:creator>
    <dc:date>2021-12-20T21:05:46Z</dc:date>
    <item>
      <title>How to base set selection on another field when based-on field has no selection specified</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1778260#M60433</link>
      <description>&lt;P&gt;I am attempting to restrict use of a numeric field by values for a related date, if a value for another date have been selected, but if no selection exist for that referenced date field, then selection for the related date field should be ignored.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;count({$&amp;lt;RunStart_YrMo_num=RunStart_YrMo_PMCells&amp;gt;}distinct serial_number)&lt;/LI-CODE&gt;&lt;P&gt;Thus, if the user have selected a value for "RunStart_YrMo_PMCells", and there be "serial_number" values for that value in the date field "RunStart_YrMo_num" that is related to&amp;nbsp;"serial_number", I get results.&lt;/P&gt;&lt;P&gt;However, if the user have not specified any selection for&amp;nbsp;"RunStart_YrMo_PMCells", I want there to be no constraint.&amp;nbsp; T&lt;SPAN&gt;he code above returns nothing in this case, rather than everything.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;René V.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:05:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1778260#M60433</guid>
      <dc:creator>plexpro52</dc:creator>
      <dc:date>2021-12-20T21:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to base set selection on another field when based-on field has no selection specified</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1778286#M60438</link>
      <description>&lt;LI-CODE lang="markup"&gt;count({$&amp;lt;serial_number={"=RunStart_YrMo_num=RunStart_YrMo_PMCells"}&amp;gt;}distinct serial_number)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i didnt understand the requirement. but may be this is what u want to try....&amp;nbsp;&lt;/P&gt;&lt;P&gt;The format of RunStart_YrMo_num and RunStart_YrMo_PMCells should be same&lt;/P&gt;&lt;P&gt;if&amp;nbsp;RunStart_YrMo_num is in num then RunStart_YrMo_PMCells should also be num.&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Priyanka&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 01:55:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1778286#M60438</guid>
      <dc:creator>PriyankaShivhare</dc:creator>
      <dc:date>2021-01-29T01:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to base set selection on another field when based-on field has no selection specified</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1778306#M60452</link>
      <description>&lt;P&gt;There's probably a few ways to do this, including the associative search solution&amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58524"&gt;@PriyankaShivhare&lt;/a&gt;&amp;nbsp;has shown you.&lt;/P&gt;&lt;P&gt;Another way is to include some logic:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(GetSelectedCount(RunStart_YrMo_PMCells) &amp;gt; 0,
    count({$ &amp;lt;RunStart_YrMo_num = {$(GetFieldSelections(RunStart_YrMo_PMCells))}&amp;gt;} distinct serial_number),
    count(distinct serial_number)
)&lt;/LI-CODE&gt;&lt;P&gt;This way if you need to convert the format of the data in some way you can include that in the result of GetFieldSelections.&lt;/P&gt;&lt;P&gt;You could perhaps also try using the intersection operator and an "&lt;A href="https://help.qlik.com/en-US/sense/November2020/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalysis/set-modifiers-implicit-field-value-definitions.htm" target="_self"&gt;element function&lt;/A&gt;":&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;count({$ &amp;lt;RunStart_YrMo_num *= P(RunStart_YrMo_PMCells)}&amp;gt; } distinct serial_number)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll see solutions like this if you search for terms such as "using a data island to limit set analysis"&lt;/P&gt;&lt;P&gt;Alternatively, the way you have described the problem suggests you have a data island in your model and you may want to consider changing the model to associate the RunStart_YrMo_PMCells field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 04:11:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1778306#M60452</guid>
      <dc:creator>Rodj</dc:creator>
      <dc:date>2021-01-29T04:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to base set selection on another field when based-on field has no selection specified</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1779061#M60551</link>
      <description>&lt;P&gt;Priyanka,&lt;/P&gt;&lt;P&gt;Thanks for your response, this would appear to be the start of a solution, but I haven't quite resolved it yet.&lt;/P&gt;&lt;P&gt;René&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 17:51:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1779061#M60551</guid>
      <dc:creator>plexpro52</dc:creator>
      <dc:date>2021-02-01T17:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to base set selection on another field when based-on field has no selection specified</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1779063#M60552</link>
      <description>&lt;P&gt;Rodj,&lt;/P&gt;&lt;P&gt;Thanks for your response, this appears promising, but I haven't quite resolved it yet.&lt;/P&gt;&lt;P&gt;René&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 17:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-base-set-selection-on-another-field-when-based-on-field/m-p/1779063#M60552</guid>
      <dc:creator>plexpro52</dc:creator>
      <dc:date>2021-02-01T17:52:17Z</dc:date>
    </item>
  </channel>
</rss>

