<?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: setting a variable with set analysis in back end code in Management &amp; Governance</title>
    <link>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703933#M16056</link>
    <description>&lt;P&gt;It's probably not liking the single quotes in your set analysis&amp;nbsp;&lt;SPAN&gt;{'Y'}.&amp;nbsp; You need to break it up and use chr(39) instead.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;= 'sum(aggr(count({&amp;lt;Rprtd_Flag={' &amp;amp;chr(39) &amp;amp;'Y' &amp;amp;chr(39) &amp;amp;'}&amp;gt;} Di&lt;/SPAN&gt;&lt;SPAN&gt;stinct UniqueKey),[Service Date]))'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 May 2020 17:12:01 GMT</pubDate>
    <dc:creator>squeakie_pig</dc:creator>
    <dc:date>2020-05-20T17:12:01Z</dc:date>
    <item>
      <title>setting a variable with set analysis in back end code</title>
      <link>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703913#M16049</link>
      <description>&lt;P&gt;I'm trying to add the function below as a variable to my code instead of master measure but it keeps giving me errors. I tried breaking it up and using the variables but it's still not working. Can anyone help me?&lt;/P&gt;&lt;P&gt;sum(aggr(count({&amp;lt;Rprtd_Flag={'Y'}&amp;gt;} Distinct UniqueKey),[Service Date]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a lot..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 16:23:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703913#M16049</guid>
      <dc:creator>Hope_AA</dc:creator>
      <dc:date>2020-05-20T16:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: setting a variable with set analysis in back end code</title>
      <link>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703917#M16050</link>
      <description>&lt;P&gt;I think you're missing some parenthesis or so ( assuming that Y is your variable)..&lt;/P&gt;&lt;P&gt;Try :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum(aggr(count({&amp;lt;Rprtd_Flag={'$(Y)'}&amp;gt;} Distinct UniqueKey),[Service Date]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum(aggr(count({&amp;lt;Rprtd_Flag={'$(=Y)'}&amp;gt;} Distinct UniqueKey),[Service Date]))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 16:28:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703917#M16050</guid>
      <dc:creator>Gui_Approbato</dc:creator>
      <dc:date>2020-05-20T16:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: setting a variable with set analysis in back end code</title>
      <link>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703923#M16051</link>
      <description>&lt;P&gt;What error do you get?&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 16:51:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703923#M16051</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-05-20T16:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: setting a variable with set analysis in back end code</title>
      <link>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703925#M16053</link>
      <description>&lt;P&gt;Unexpected Token....&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;see below&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 16:59:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703925#M16053</guid>
      <dc:creator>Hope_AA</dc:creator>
      <dc:date>2020-05-20T16:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: setting a variable with set analysis in back end code</title>
      <link>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703926#M16054</link>
      <description>&lt;P&gt;Oh, you are trying to store this expression into a variable within the script? May be try SET like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SET Cnt_All_Unique = Sum(Aggr(Count({&amp;lt;Rprtd_Flag = {'Y'}&amp;gt;} DISTINCT UniqueKey), [Service Date]));&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 May 2020 17:03:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703926#M16054</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-05-20T17:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: setting a variable with set analysis in back end code</title>
      <link>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703930#M16055</link>
      <description>&lt;P&gt;sorry maybe I didn't explain well but yes, that's the whole code for this part which is still creating the same error.&lt;/P&gt;&lt;P&gt;SET Cnt_All_Unique = Sum(Aggr(Count({&amp;lt;Rprtd_Flag = {'Y'}&amp;gt;} DISTINCT UniqueKey), [Service Date]));&lt;BR /&gt;let Cnt_All_Unique= $(Cnt_All_Unique);&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 17:10:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703930#M16055</guid>
      <dc:creator>Hope_AA</dc:creator>
      <dc:date>2020-05-20T17:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: setting a variable with set analysis in back end code</title>
      <link>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703933#M16056</link>
      <description>&lt;P&gt;It's probably not liking the single quotes in your set analysis&amp;nbsp;&lt;SPAN&gt;{'Y'}.&amp;nbsp; You need to break it up and use chr(39) instead.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;= 'sum(aggr(count({&amp;lt;Rprtd_Flag={' &amp;amp;chr(39) &amp;amp;'Y' &amp;amp;chr(39) &amp;amp;'}&amp;gt;} Di&lt;/SPAN&gt;&lt;SPAN&gt;stinct UniqueKey),[Service Date]))'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 17:12:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703933#M16056</guid>
      <dc:creator>squeakie_pig</dc:creator>
      <dc:date>2020-05-20T17:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: setting a variable with set analysis in back end code</title>
      <link>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703937#M16057</link>
      <description>&lt;P&gt;That was it... thank you so much.&lt;/P&gt;&lt;P&gt;Really appreciate all your help both of you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 17:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/setting-a-variable-with-set-analysis-in-back-end-code/m-p/1703937#M16057</guid>
      <dc:creator>Hope_AA</dc:creator>
      <dc:date>2020-05-20T17:20:32Z</dc:date>
    </item>
  </channel>
</rss>

