<?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: And / Or query implementation in set analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/And-Or-query-implementation-in-set-analysis/m-p/2412831#M94789</link>
    <description>&lt;P&gt;Hi Vegar,&lt;/P&gt;
&lt;P&gt;Thanks for your prompt response.&lt;/P&gt;
&lt;P&gt;Attributes I am using in this query are coming from different tables, hence its difficult to implement in script and also I have to implement similar queries for other metrics as well with different attributes.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;SP&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2024 03:31:38 GMT</pubDate>
    <dc:creator>SP_Qlik</dc:creator>
    <dc:date>2024-01-31T03:31:38Z</dc:date>
    <item>
      <title>And / Or query implementation in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/And-Or-query-implementation-in-set-analysis/m-p/2412726#M94784</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Hope you are doing well!&lt;/P&gt;
&lt;P&gt;I want to add below filter criteria into my set analysis which includes multiple And/or conditions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please help me how to write set analysis for below query.&lt;/P&gt;
&lt;P&gt;Measure: Count(ID's)&lt;/P&gt;
&lt;P&gt;Filter Criteria:&lt;STRONG&gt;( ( Ind_Valid_Only&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;OR ( Ind_Valid_Only_With_PrivateData&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;AND Aff_Market_Access_Flag Equal Y&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;OR ( Ind_Status_cod Equal 9&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;AND Ind_Status_date Greater than_LastDayLast_Month&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;AND ( Aff_Private_Company Is Null&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;OR Aff_Market_Access_Flag Equal Y&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;AND Ind_Professional_Type_cod Equal M&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;AND Ind_Creation_date Less than or Equal to_LastDayLast_Month&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Here I want to include my filter criteria into set analysis&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;SP&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 17:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/And-Or-query-implementation-in-set-analysis/m-p/2412726#M94784</guid>
      <dc:creator>SP_Qlik</dc:creator>
      <dc:date>2024-01-30T17:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: And / Or query implementation in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/And-Or-query-implementation-in-set-analysis/m-p/2412802#M94788</link>
      <description>&lt;P&gt;Set analysis might not be the best fit for this. It looks like an advanced rule. What if you pre calculate&amp;nbsp; this in the script.&lt;/P&gt;
&lt;P&gt;If(( ( Ind_Valid_Only&lt;/P&gt;
&lt;P&gt;OR ( Ind_Valid_Only_With_PrivateData&lt;/P&gt;
&lt;P&gt;AND Aff_Market_Access_Flag Equal Y&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;OR ( Ind_Status_cod Equal 9&lt;/P&gt;
&lt;P&gt;AND Ind_Status_date Greater than_LastDayLast_Month&lt;/P&gt;
&lt;P&gt;AND ( Aff_Private_Company Is Null&lt;/P&gt;
&lt;P&gt;OR Aff_Market_Access_Flag Equal Y&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;AND Ind_Professional_Type_cod Equal M&lt;/P&gt;
&lt;P&gt;AND Ind_Creation_date Less than or Equal to_LastDayLast_Month&lt;/P&gt;
&lt;P&gt;), 1, 0) as flag_field,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you could just use:&amp;nbsp;&lt;EM&gt;count{&amp;lt;flag_field={1}&amp;gt;}ID)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 23:37:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/And-Or-query-implementation-in-set-analysis/m-p/2412802#M94788</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2024-01-30T23:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: And / Or query implementation in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/And-Or-query-implementation-in-set-analysis/m-p/2412831#M94789</link>
      <description>&lt;P&gt;Hi Vegar,&lt;/P&gt;
&lt;P&gt;Thanks for your prompt response.&lt;/P&gt;
&lt;P&gt;Attributes I am using in this query are coming from different tables, hence its difficult to implement in script and also I have to implement similar queries for other metrics as well with different attributes.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;SP&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 03:31:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/And-Or-query-implementation-in-set-analysis/m-p/2412831#M94789</guid>
      <dc:creator>SP_Qlik</dc:creator>
      <dc:date>2024-01-31T03:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: And / Or query implementation in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/And-Or-query-implementation-in-set-analysis/m-p/2413059#M94818</link>
      <description>&lt;P&gt;Does your data-model support this kind of query? NULL for example couldn't be directly queried and in the most scenarios it would be useful to replace them with real values in the script.&lt;/P&gt;
&lt;P&gt;A quite quick check would be to use the count-expression without a condition and then selecting all wanted values in the appropriate fields. Are these selections possible and the count returned the expected results an appropriate set analysis statement would be possible. If not you could place all these fields within a table-box and playing again with the selections to see the existing relationships and data which would hint a few directions to adjust the data-model.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 13:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/And-Or-query-implementation-in-set-analysis/m-p/2413059#M94818</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-01-31T13:22:21Z</dc:date>
    </item>
  </channel>
</rss>

