<?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 HELP! Set analysis Measure in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/HELP-Set-analysis-Measure/m-p/2003608#M83098</link>
    <description>&lt;P&gt;Hello friends, I am dealing with an issue, and I request help,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I built a measure to show a count distinct of users filtered by some columns, but I need to use a conditional for Dates, I have already the conditional for the dates working fine in a fact table, but I need to introduce it on the formula measure, I just can't see how,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Initially I have added a similar condition (I thought it worked) but is not working:&lt;/P&gt;
&lt;P&gt;The formula measure is:&lt;/P&gt;
&lt;P&gt;1. Count( distinct {&amp;lt;[GSDP.termstartdate_vp.autoCalendar.Year],[GSDP.termstartdate_vp.autoCalendar.Month],&lt;BR /&gt;CRM.servicetype={'Optional'},CRM.I_CMPGN={'9098'},CRM.contact_date ={"&amp;lt;=$(Date(Max(CRM.termstartdate)))"} &amp;gt;} VIN_)&lt;/P&gt;
&lt;P&gt;The conditional of the fact table is&lt;/P&gt;
&lt;P&gt;2. =if(CRM.contact_date=aggr(max(if(CRM.contact_date &amp;lt;= CRM.termstartdate,CRM.contact_date)),VIN_),CRM.OFFER_VERSION_DESC1)&lt;/P&gt;
&lt;P&gt;the VIN_ is the ID User,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried this in order to match the two formulas, due to I thought that the condition&amp;nbsp;CRM.contact_date ={"&amp;lt;=$(Date(Max(CRM.termstartdate)))"} from the 1. formula can potencially make what the 2. is doing, knowing that is not, I need to introduce #2. on#1.&lt;/P&gt;
&lt;P&gt;The formula I built and didn't work is:&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;Count( distinct {&amp;lt;[GSDP.termstartdate_vp.autoCalendar.Year],[GSDP.termstartdate_vp.autoCalendar.Month],&lt;BR /&gt;CRM.servicetype={'Optional'},CRM.I_CMPGN={'9098'},CRM.contact_date &amp;lt;= CRM.termstartdate,CRM.contact_date&amp;gt;} VIN_)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2022 14:55:06 GMT</pubDate>
    <dc:creator>FelipeK16</dc:creator>
    <dc:date>2022-11-11T14:55:06Z</dc:date>
    <item>
      <title>HELP! Set analysis Measure</title>
      <link>https://community.qlik.com/t5/App-Development/HELP-Set-analysis-Measure/m-p/2003608#M83098</link>
      <description>&lt;P&gt;Hello friends, I am dealing with an issue, and I request help,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I built a measure to show a count distinct of users filtered by some columns, but I need to use a conditional for Dates, I have already the conditional for the dates working fine in a fact table, but I need to introduce it on the formula measure, I just can't see how,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Initially I have added a similar condition (I thought it worked) but is not working:&lt;/P&gt;
&lt;P&gt;The formula measure is:&lt;/P&gt;
&lt;P&gt;1. Count( distinct {&amp;lt;[GSDP.termstartdate_vp.autoCalendar.Year],[GSDP.termstartdate_vp.autoCalendar.Month],&lt;BR /&gt;CRM.servicetype={'Optional'},CRM.I_CMPGN={'9098'},CRM.contact_date ={"&amp;lt;=$(Date(Max(CRM.termstartdate)))"} &amp;gt;} VIN_)&lt;/P&gt;
&lt;P&gt;The conditional of the fact table is&lt;/P&gt;
&lt;P&gt;2. =if(CRM.contact_date=aggr(max(if(CRM.contact_date &amp;lt;= CRM.termstartdate,CRM.contact_date)),VIN_),CRM.OFFER_VERSION_DESC1)&lt;/P&gt;
&lt;P&gt;the VIN_ is the ID User,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried this in order to match the two formulas, due to I thought that the condition&amp;nbsp;CRM.contact_date ={"&amp;lt;=$(Date(Max(CRM.termstartdate)))"} from the 1. formula can potencially make what the 2. is doing, knowing that is not, I need to introduce #2. on#1.&lt;/P&gt;
&lt;P&gt;The formula I built and didn't work is:&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;Count( distinct {&amp;lt;[GSDP.termstartdate_vp.autoCalendar.Year],[GSDP.termstartdate_vp.autoCalendar.Month],&lt;BR /&gt;CRM.servicetype={'Optional'},CRM.I_CMPGN={'9098'},CRM.contact_date &amp;lt;= CRM.termstartdate,CRM.contact_date&amp;gt;} VIN_)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 14:55:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/HELP-Set-analysis-Measure/m-p/2003608#M83098</guid>
      <dc:creator>FelipeK16</dc:creator>
      <dc:date>2022-11-11T14:55:06Z</dc:date>
    </item>
  </channel>
</rss>

