<?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 - Incorporating a Formula with a Variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1696751#M53296</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/18624"&gt;@Gysbert_Wassenaar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wouldn't it be better (safer)&amp;nbsp; just to not use set analysis and use if in a situation like this (Or set up in script)&lt;/P&gt;&lt;P&gt;As set out in this thread that Henric gave the correct solution to&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-App-Development/P-and-E-Syntax-issue/td-p/106074" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Qlik-Sense-App-Development/P-and-E-Syntax-issue/td-p/106074&lt;/A&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;Further, the search&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; count([Class Number]={"=[Claims Opened Date] = [Claims Reported Date]"}&amp;gt;[Claims Number])&lt;/SPAN&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;will not always work either: Here, a hypercube with &lt;SPAN&gt;[Class Number] &lt;/SPAN&gt;as dimension will be created in the background, and&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; [Claims Opened Date] = [Claims Reported Date]&lt;/SPAN&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;will be used as measure. Records with this evaluated as TRUE will be included in the search result. But classes with multiple open dates and multiple report dates will be evaluated as&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; NULL = NULL&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;which in turn is FALSE, even if there are individual dates that match.&amp;nbsp; So, the search will not (always) work either.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;The solution with the If() function will work fine, though.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Apr 2020 00:39:25 GMT</pubDate>
    <dc:creator>robert99</dc:creator>
    <dc:date>2020-04-26T00:39:25Z</dc:date>
    <item>
      <title>Set Analysis - Incorporating a Formula with a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1696641#M53290</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I am trying to write a set analysis incorporating a formula with a variable, as follows:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[Customerorders MS Set Description]&lt;/P&gt;&lt;P&gt;={$( =WEEKDAY(NUM([Customerorders Wanted Delivery Date])-'$(vDayOffset)') )}&amp;gt;}&lt;/P&gt;&lt;P&gt;[Customerorders Forecast Qty])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially,&amp;nbsp;[Customerorders MS Set Description] contains weekday values, example 'Sun' through 'Sat'.&lt;/P&gt;&lt;P&gt;I am calculating back from&amp;nbsp;[Customerorders Wanted Delivery Date] using a variable enumerating to a value of 1 - 5.&lt;/P&gt;&lt;P&gt;This is consistently returning zero values.&lt;/P&gt;&lt;P&gt;I know there are missing "..." within the expression above, what is actually tripping me up is the variable, it's quotation marks '' and dollar expansion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be really grateful for any thoughts.&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;SS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1696641#M53290</guid>
      <dc:creator>matthew_morge</dc:creator>
      <dc:date>2024-11-16T02:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Incorporating a Formula with a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1696683#M53294</link>
      <description>&lt;P&gt;My guess is you're trying to do what I've described in this post: &lt;A href="https://community.qlik.com/t5/QlikView-Documents/set-analysis-intra-record-qvw/tac-p/1479691" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/QlikView-Documents/set-analysis-intra-record-qvw/tac-p/1479691.&lt;/A&gt; The .qvw file won't be very useful if you're using QlikSense. Hopefully the screenshot below (also attached as a file) is readable enough.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="set_analysis.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32463iAD171998D5198854/image-size/large?v=v2&amp;amp;px=999" role="button" title="set_analysis.png" alt="set_analysis.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 11:21:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1696683#M53294</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2020-04-25T11:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Incorporating a Formula with a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1696751#M53296</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/18624"&gt;@Gysbert_Wassenaar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wouldn't it be better (safer)&amp;nbsp; just to not use set analysis and use if in a situation like this (Or set up in script)&lt;/P&gt;&lt;P&gt;As set out in this thread that Henric gave the correct solution to&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-App-Development/P-and-E-Syntax-issue/td-p/106074" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Qlik-Sense-App-Development/P-and-E-Syntax-issue/td-p/106074&lt;/A&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;Further, the search&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; count([Class Number]={"=[Claims Opened Date] = [Claims Reported Date]"}&amp;gt;[Claims Number])&lt;/SPAN&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;will not always work either: Here, a hypercube with &lt;SPAN&gt;[Class Number] &lt;/SPAN&gt;as dimension will be created in the background, and&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; [Claims Opened Date] = [Claims Reported Date]&lt;/SPAN&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;will be used as measure. Records with this evaluated as TRUE will be included in the search result. But classes with multiple open dates and multiple report dates will be evaluated as&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; NULL = NULL&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;which in turn is FALSE, even if there are individual dates that match.&amp;nbsp; So, the search will not (always) work either.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000080"&gt;&lt;EM&gt;The solution with the If() function will work fine, though.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2020 00:39:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1696751#M53296</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2020-04-26T00:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Incorporating a Formula with a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1696787#M53297</link>
      <description>&lt;P&gt;Thanks both for your input. Whilst enlightening responses I think my issue was much more basic and purely the result of the string not being properly expanded under the set analysis.&lt;/P&gt;&lt;P&gt;I have managed to get around this by doing a simple IF(MATCH formula in a dimension with the same criteria and it seems to be sufficiently doing the job.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2020 10:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1696787#M53297</guid>
      <dc:creator>matthew_morge</dc:creator>
      <dc:date>2020-04-26T10:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Incorporating a Formula with a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1699054#M53523</link>
      <description>&lt;P&gt;Still struggling on this formula, I need to avoid IF statements where I can so I am still trying to get the set analysis to work. The issue I think I am encountering is formula is not evaluating correctly.&lt;/P&gt;&lt;P&gt;The following is the expression:&lt;/P&gt;&lt;P&gt;=SUM({$&amp;lt;[Customerorders MS Set Description]={"$(=WEEKDAY(NUM([Customerorders Numerical Wanted Delivery Date]-$(=vDayOffset))"}&amp;gt;}[Customerorders Forecast Qty])&lt;/P&gt;&lt;P&gt;Whilst the variable; vDayOffset is correctly returning a value of '5', it is the **WEEKDAY(NUM([Customerorders Numerical Wanted Delivery Date]** that I believe is not returning the correct information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached a screenshot of the help bar at the bottom of the expression editor for reference. It may be that I am missing something small but obvious within the expression. Whilst I love working with Qlik Sense, I hate getting into these simple but puzzling problems.&lt;/P&gt;&lt;P&gt;If anyone is able to enlighten me I would be extremely grateful.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 14:14:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1699054#M53523</guid>
      <dc:creator>matthew_morge</dc:creator>
      <dc:date>2020-05-05T14:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Incorporating a Formula with a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1699238#M53534</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/9837"&gt;@matthew_morge&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you missing two ))&amp;nbsp; Sometimes the OK at the bottom is not correct when you use more complex set analysis&lt;/P&gt;&lt;P&gt;$(=WEEKDAY(NUM([Customerorders Numerical Wanted Delivery Date]&amp;nbsp; )) &amp;nbsp;&amp;nbsp; -$(=vDayOffset))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"I hate getting into these simple but puzzling problems"&lt;/P&gt;&lt;P&gt;When this happens with me I simplify and / or try different options to find out for sure what the issue is&lt;/P&gt;&lt;P&gt;For example have you tried&lt;/P&gt;&lt;P&gt;num(weekday(&lt;/P&gt;&lt;P&gt;Removing the variable &amp;gt;&amp;gt; -$(=vDayOffset)) to see if it gives the correct result&lt;/P&gt;&lt;P&gt;Calculating the weekday number in script. With and without subtracting the 5 days&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 01:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Incorporating-a-Formula-with-a-Variable/m-p/1699238#M53534</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2020-05-06T01:34:18Z</dc:date>
    </item>
  </channel>
</rss>

