<?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: Lost Product in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2190079#M51171</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334520" data-lia-user-login="v-yanjiang-msft" class="lia-mention lia-mention-user"&gt;v-yanjiang-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can you refrence columns in the IF functions as it shows as error? unless you want me to creat a calculated column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Lost Product 3 = 
VAR _Period =
    DATESINPERIOD ( Data[Date], MAX ( Data[Date] ), -3, MONTH )
RETURN
IF( 'Data'[Product] = "Production" &amp;amp;&amp;amp; Data[Action] = "View" &amp;amp;&amp;amp; NOT('Data'[Date]) IN _Period,1,
    IF( 'Data'[Product] = "Production" &amp;amp;&amp;amp; Data[Action] = "View",0,BLANK()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Nov 2021 10:53:45 GMT</pubDate>
    <dc:creator>H_insight</dc:creator>
    <dc:date>2021-11-15T10:53:45Z</dc:date>
    <item>
      <title>Lost Product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2182861#M50839</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to identify lost product within my sample file for over 3 months ago. So All products thats meet the below criteria and over than 3 months old (rolling).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Criteria as follows: 1. product (col)= Production 2. Action (col) = View 3. Period is rolling last 3 months&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my DAX attempt:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Lost Product = 
VAR _Period = DATESINPERIOD(Data[Date],MAX(Data[Date]),-3,MONTH)
Return
CALCULATE(DISTINCTCOUNT(Data[Product]),NOT(Data[Date]) in _Period,FILTER(Data, Data[Product] ="Production"),FILTER(Data,Data[Action] = "View"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above dax return 1 record only, where I was expecting 4 records.&lt;/P&gt;&lt;P&gt;Any advice or tips would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;A title="Sample file Link." href="https://easyupload.io/3x0rxf" target="_self"&gt;Sample file Link.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Sample file Link." href="https://easyupload.io/3x0rxf" target="_self"&gt;Thanks, H&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 12:17:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2182861#M50839</guid>
      <dc:creator>H_insight</dc:creator>
      <dc:date>2021-11-10T12:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Lost Product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2182968#M50845</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="205599" data-lia-user-login="H_insight" class="lia-mention lia-mention-user"&gt;H_insight&lt;/a&gt;&amp;nbsp; Did you need this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Lost Product = 
VAR _Period =
    DATESINPERIOD ( Data[Date], MAX ( Data[Date] ), -3, MONTH )
RETURN
    CALCULATE (
        COUNTROWS ( Data ),
        NOT ( Data[Date] ) IN _Period,
        FILTER ( Data, Data[Product] = "Production" &amp;amp;&amp;amp; Data[Action] = "View" )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 12:55:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2182968#M50845</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-11-10T12:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lost Product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2183066#M50847</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works fine, but when I drag the date column nothing shows, any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks, H&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 13:37:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2183066#M50847</guid>
      <dc:creator>H_insight</dc:creator>
      <dc:date>2021-11-10T13:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lost Product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2183070#M50848</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="205599" data-lia-user-login="H_insight" class="lia-mention lia-mention-user"&gt;H_insight&lt;/a&gt;&amp;nbsp; can you please provide your desired output clearly?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 13:38:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2183070#M50848</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-11-10T13:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Lost Product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2183114#M50851</link>
      <description>&lt;P&gt;Expected outcome like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with the new measure the output shows the correct result (4 records) but when I add "Date" column, nothing shows in PBI.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 13:55:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2183114#M50851</guid>
      <dc:creator>H_insight</dc:creator>
      <dc:date>2021-11-10T13:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Lost Product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2189108#M51138</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="205599" data-lia-user-login="H_insight" class="lia-mention lia-mention-user"&gt;H_insight&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to your description, here&lt;/SPAN&gt;’&lt;SPAN&gt;s my solution. &lt;/SPAN&gt;“&lt;SPAN&gt;Lost Product&lt;/SPAN&gt;”&lt;SPAN&gt; is a column. as in the visual, the same options are not displayed repeatedly, so they add up to 3.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 01:37:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2189108#M51138</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2021-11-15T01:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lost Product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2190079#M51171</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334520" data-lia-user-login="v-yanjiang-msft" class="lia-mention lia-mention-user"&gt;v-yanjiang-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can you refrence columns in the IF functions as it shows as error? unless you want me to creat a calculated column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Lost Product 3 = 
VAR _Period =
    DATESINPERIOD ( Data[Date], MAX ( Data[Date] ), -3, MONTH )
RETURN
IF( 'Data'[Product] = "Production" &amp;amp;&amp;amp; Data[Action] = "View" &amp;amp;&amp;amp; NOT('Data'[Date]) IN _Period,1,
    IF( 'Data'[Product] = "Production" &amp;amp;&amp;amp; Data[Action] = "View",0,BLANK()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 10:53:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2190079#M51171</guid>
      <dc:creator>H_insight</dc:creator>
      <dc:date>2021-11-15T10:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Lost Product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2213627#M52306</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="205599" data-lia-user-login="H_insight" class="lia-mention lia-mention-user"&gt;H_insight&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;In my sample, Lost Product is a calculated column, I also create a measure in my sample, it cannot get the expected result, I attach it bellow to help you understand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 09:37:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2213627#M52306</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2021-11-30T09:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Lost Product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2213881#M52315</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334520" data-lia-user-login="v-yanjiang-msft" class="lia-mention lia-mention-user"&gt;v-yanjiang-msft&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your attempt, much appreciated. I realised the measure won't get me the expected result. For now I will accept this as a soultion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, H&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 11:26:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lost-Product/m-p/2213881#M52315</guid>
      <dc:creator>H_insight</dc:creator>
      <dc:date>2021-11-30T11:26:48Z</dc:date>
    </item>
  </channel>
</rss>

