<?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: Problems calculating if there was a product-placement in the last 12 months before the filtered date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2900041#M94410</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I updated the DAX but it is loading and loading and so a tried and checked every single step, step by step:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Step: Returning the _linedate is correct:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Step: Returning the _1yearbefore is also correct:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Step: Returning _2result&lt;/P&gt;&lt;P&gt;Report is loading and loading without showing any result after &amp;gt; 10 minutes&lt;BR /&gt;(although this VAR has not been modified after we had the _1yearbefore on TODAY() before)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[..]
VAR _2result =
    CALCULATE (
        MIN ( 'Sales'[Date] ),
        FILTER (
            ALL ( 'Sales' ),
            'Sales'[Date] &amp;gt;= _1yearbefore
                &amp;amp;&amp;amp; 'Sales'[family] = SELECTEDVALUE ( 'Sales'[family] )
        )
    )

RETURN
_2result
[..]&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Can you imagine why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ps: You wrote "&lt;SPAN&gt;If it still does not help, please provide pbix file without privacy information so that I&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;can help you get the soultion quickly!!!"&amp;nbsp;&lt;/STRONG&gt;and i am sorry for interrupting you so much. But in every step i thought "now we are very close to the solution" and otherwise i do not really know how to give you the pbix file withouth privacy informations in a fast way. (pbix has 360 MB with millions of entries in over 40 tables and i do not know how i can fastly minimize the entries and tables to send it to you... Should we make a teamscall instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for that.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2022 11:33:28 GMT</pubDate>
    <dc:creator>martinobermayr</dc:creator>
    <dc:date>2022-11-11T11:33:28Z</dc:date>
    <item>
      <title>Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2895185#M94078</link>
      <description>&lt;P&gt;Hi folks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to calculate if a productplacement is new.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tables&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Table 'Sales' with every invoice, customer, product etc. per date&lt;/LI&gt;&lt;LI&gt;Table 'Calendar' with date-connection to 'Sales' and further fields as MM/YY and so on&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Measures&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Measure 'Placement' which does a DISTINCTCOUNT on a combined-textfield "customernumber+yymm+product" to see if a product was placed at the customer in this YYMM-periode:&lt;BR /&gt;&lt;BR /&gt;PLACEMENT = DISTINCTCOUNT('Sales'[CUSTOMER+YYMM+PRODUCT])&lt;BR /&gt;&lt;BR /&gt;Showing this in a table seems to be correct:&lt;UL&gt;&lt;LI&gt;1st table = two products with 5 placements&lt;/LI&gt;&lt;LI&gt;2nd table = these product placements each mm/yy&lt;/LI&gt;&lt;LI&gt;3rd table = each invoice-line per date&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;So far so good (and correct) but now i would really love to see, wheter a product was already placed before or placed the first time:&lt;UL&gt;&lt;LI&gt;As you can see in the 3rd table, the product "DECARBONIZER", sold on 7.11.22, was never sold before -&amp;gt; So i would like to tag it as a new placement with '1'&lt;/LI&gt;&lt;LI&gt;The "A+M-FINISH" was sold a few times before -&amp;gt; So it should be tagged as a new placement with '1' in the earliest invoiceline from 06.11.21. Every later invoice-line should not be tagged because of already existing&lt;/LI&gt;&lt;LI&gt;Based on the data mentioned before, i would like to get a table, that should deliver this result:&lt;BR /&gt;(this table was 'photoshoped' to simulate what i would like to get)&lt;BR /&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;but i really dont know how to solve this!?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Could someone please help me?&lt;BR /&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 11:25:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2895185#M94078</guid>
      <dc:creator>martinobermayr</dc:creator>
      <dc:date>2022-11-09T11:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2896680#M94209</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="245679" data-lia-user-login="martinobermayr" class="lia-mention lia-mention-user"&gt;martinobermayr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please have a try.&lt;/P&gt;
&lt;P&gt;Create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure =
VAR _1yearbefore =
    EDATE ( TODAY (), -12 )
RETURN
    CALCULATE (
        MIN ( TABLE[DATE] ),
        FILTER (
            ALL ( TABLE ),
            TABLE[DATE] &amp;gt;= _1yearbefore
                &amp;amp;&amp;amp; table[familie] = SELECTEDVALUE ( table[familie] )
        )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 05:49:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2896680#M94209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-10T05:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2897253#M94254</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;.&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply - i think that took me one step closer to my final solution.&lt;/P&gt;&lt;P&gt;I integrated the code you gave me, and now the measure shows the date of the first product-placement, as we can see in the screenshot in the last column:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thats correct so far.&lt;BR /&gt;&lt;BR /&gt;But in my final solution i now would like, that only the 07.12.21-Line is tagged as "1" (for new)&lt;BR /&gt;To simulate the desired output it should look like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May i ask you how your DAX should be modified to reach this goal?&lt;BR /&gt;&lt;BR /&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 10:03:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2897253#M94254</guid>
      <dc:creator>martinobermayr</dc:creator>
      <dc:date>2022-11-10T10:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2898780#M94334</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="245679" data-lia-user-login="martinobermayr" class="lia-mention lia-mention-user"&gt;martinobermayr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please modify the measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure =
VAR _1yearbefore =
    EDATE ( TODAY (), -12 )
VAR _2result =
    CALCULATE (
        MIN ( TABLE[DATE] ),
        FILTER (
            ALL ( TABLE ),
            TABLE[DATE] &amp;gt;= _1yearbefore
                &amp;amp;&amp;amp; table[familie] = SELECTEDVALUE ( table[familie] )
        )
    )
RETURN
    IF ( MAX ( TABLE[DATE] ) = _2result, _2result, BLANK () )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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>Fri, 11 Nov 2022 01:03:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2898780#M94334</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-11T01:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2899422#M94376</link>
      <description>&lt;P&gt;Good morning&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perfect, it's getting better and better. I thought that this is the solution now, but there is one (little?) question left:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF ( MAX ( TABLE[DATE] ) = _2result, _2result, BLANK () )&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Shows the date out from _2result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i want a countable "1" instead, to measure and sum how good the sales-performance on placeing new products is. So when i replace your "_2result" with a simple "1", i thought i could solve my needs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF( MAX ( TABLE[DATE] ) = _2result, 1, BLANK () )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result seems to be right:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yellow = correct&amp;nbsp;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Red = Here should be the column sum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to provide this?&lt;/P&gt;&lt;P&gt;Measure is formated as number:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 07:22:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2899422#M94376</guid>
      <dc:creator>martinobermayr</dc:creator>
      <dc:date>2022-11-11T07:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2899437#M94378</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="245679" data-lia-user-login="martinobermayr" class="lia-mention lia-mention-user"&gt;martinobermayr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;It seems you want to show the measure correctly total.&lt;/P&gt;
&lt;P&gt;Please have a try.&lt;/P&gt;
&lt;P&gt;Create a measure based on [measure].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;result=var _b=summarize(table,table[date],"aaa",[measure])
return
if(hasonevalue(table[date]),[measure],sumx(_b,aaa))
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Also you can use the unique value in the column replace the date column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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>Fri, 11 Nov 2022 07:31:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2899437#M94378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-11T07:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2899533#M94380</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yep, that was the solution to sum it. - Thank you very very much:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately after testing this function with a few examples, i found out that there is a fundamental part missing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently this new placement measure calculates, when the product was first time placed in the last 12 months, outgoing from today's date:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR _1yearbefore =
    EDATE ( TODAY(), -12 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what i actually have to analyze is, if the product was sold 12 months before &lt;U&gt;the respective line.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can cou please give me an idea of what i should insert instead of TODAY() in this EDATE, to get the respective line date?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, I hope i could explain it understandable!?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 08:03:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2899533#M94380</guid>
      <dc:creator>martinobermayr</dc:creator>
      <dc:date>2022-11-11T08:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2899546#M94382</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="245679" data-lia-user-login="martinobermayr" class="lia-mention lia-mention-user"&gt;martinobermayr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please have a try.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure= var _maxdate =
MaxX (
    FILTER ( ALL ( table ), table[familie] = SELECTEDVALUE ( table[familie] ) ),
    table[date]
)
var _1year=
    EDATE ( _maxdate, -12 )
VAR _2result =
    CALCULATE (
        MIN ( TABLE[DATE] ),
        FILTER (
            ALL ( TABLE ),
            TABLE[DATE] &amp;gt;= _1yearbefore
                &amp;amp;&amp;amp; table[familie] = SELECTEDVALUE ( table[familie] )
        )
    )
RETURN
    IF ( MAX ( TABLE[DATE] ) = _2result, _2result, BLANK () )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it still does not help, please provide pbix file without privacy information so that I &lt;STRONG&gt;can help you get the soultion quickly!!!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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>Fri, 11 Nov 2022 08:10:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2899546#M94382</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-11T08:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2900041#M94410</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I updated the DAX but it is loading and loading and so a tried and checked every single step, step by step:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Step: Returning the _linedate is correct:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Step: Returning the _1yearbefore is also correct:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Step: Returning _2result&lt;/P&gt;&lt;P&gt;Report is loading and loading without showing any result after &amp;gt; 10 minutes&lt;BR /&gt;(although this VAR has not been modified after we had the _1yearbefore on TODAY() before)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[..]
VAR _2result =
    CALCULATE (
        MIN ( 'Sales'[Date] ),
        FILTER (
            ALL ( 'Sales' ),
            'Sales'[Date] &amp;gt;= _1yearbefore
                &amp;amp;&amp;amp; 'Sales'[family] = SELECTEDVALUE ( 'Sales'[family] )
        )
    )

RETURN
_2result
[..]&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Can you imagine why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ps: You wrote "&lt;SPAN&gt;If it still does not help, please provide pbix file without privacy information so that I&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;can help you get the soultion quickly!!!"&amp;nbsp;&lt;/STRONG&gt;and i am sorry for interrupting you so much. But in every step i thought "now we are very close to the solution" and otherwise i do not really know how to give you the pbix file withouth privacy informations in a fast way. (pbix has 360 MB with millions of entries in over 40 tables and i do not know how i can fastly minimize the entries and tables to send it to you... Should we make a teamscall instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for that.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 11:33:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2900041#M94410</guid>
      <dc:creator>martinobermayr</dc:creator>
      <dc:date>2022-11-11T11:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2902399#M94573</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="245679" data-lia-user-login="martinobermayr" class="lia-mention lia-mention-user"&gt;martinobermayr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;What is the&amp;nbsp;&lt;SPAN&gt;_2result? It still errors?&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure = 
VAR _maxdate =
    MAXX (
        FILTER ( ALL ( sales ), sales[familie] = SELECTEDVALUE ( sales[familie] ) ),
        sales[date]
    )
VAR _1year =
    EDATE ( _maxdate, -12 )
VAR _2result =
    MINX (
        FILTER (
            ALL ( sales ),
            sales[date] &amp;gt;= _1year
                &amp;amp;&amp;amp; sales[familie] = SELECTEDVALUE ( sales[familie] )
        ),
        sales[date]
    )
RETURN
    IF ( MAX ( sales[date] ) = _2result, _2result, BLANK () )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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, 14 Nov 2022 01:59:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2902399#M94573</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-14T01:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2905658#M94788</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Yep, unfortunately it still errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your pbix has the same DAX as my pbix has - so the DAX itself should be correct.&lt;BR /&gt;&lt;BR /&gt;I think the problem now is a performance problem: To simulate this, i added my salestable without privacy informations and i would like to ask you to try some of the family-filters on the left to see how long the calculation in the following columns takes time. (i send you the pbix with private message)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This example is filtered to one customer with 142 lines in the sales-table (out of 1.5 mio lines)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Please at least have a try with the family filter "MULTISPRAY". There will be no new placement (which is correct), and the calculation of the 14 result lines lasts long.&lt;/LI&gt;&lt;LI&gt;Please have a try with other family-filter as well.&lt;/LI&gt;&lt;LI&gt;When setting no filter, the calculation takes &amp;gt; 3 minutes for just this one customer with 142 datasets.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is there any chance to get the DAX much more performant?&lt;BR /&gt;Or is it a problem with the power query strings "customer+family" or "customer+family+yyyymm" that i implemented to get those filters to analyse new placements each customer?&lt;BR /&gt;Or is it because i have to get the family-id in the powerquery out of table products first?&lt;BR /&gt;Or will the only performance boost be to have those "new placement" tags already in the delivered database and only summarize them in PowerBI?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 07:40:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2905658#M94788</guid>
      <dc:creator>martinobermayr</dc:creator>
      <dc:date>2022-11-15T07:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2911647#M95155</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;.&lt;BR /&gt;&lt;BR /&gt;May i kindly ask you again if you could please help me or give me an idea of where i could get helped? Please find my further informations in my latest post and in the PM i sent to you.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 06:47:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2911647#M95155</guid>
      <dc:creator>martinobermayr</dc:creator>
      <dc:date>2022-11-17T06:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2911659#M95156</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="245679" data-lia-user-login="martinobermayr" class="lia-mention lia-mention-user"&gt;martinobermayr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'm so sorry I missed it.&amp;nbsp;Due to privacy concerns, we do not have the right to view and reply to private messages. I cannot reproduce your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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>Thu, 17 Nov 2022 06:51:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2911659#M95156</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-17T06:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2912896#M95221</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;.&lt;BR /&gt;&lt;BR /&gt;Sorry, did not knew the privacy concern due to PMs.&lt;BR /&gt;Please read my current status in my latest post:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2905658/highlight/true#M94788" target="_blank"&gt;Re: Problems calculating if there was a product-pl... - Microsoft Power BI Community&lt;/A&gt;&lt;BR /&gt;The pbix-Downloadlink:&amp;nbsp;&lt;A href="https://we.tl/t-7wL5ZYMMqz" target="_blank"&gt;https://we.tl/t-7wL5ZYMMqz&lt;/A&gt;&lt;BR /&gt;(unfortunately i cannot upload it into this thread, dont know why)&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 13:59:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2912896#M95221</guid>
      <dc:creator>martinobermayr</dc:creator>
      <dc:date>2022-11-17T13:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problems calculating if there was a product-placement in the last 12 months before the filtered date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2914073#M95318</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="245679" data-lia-user-login="martinobermayr" class="lia-mention lia-mention-user"&gt;martinobermayr&lt;/a&gt;&amp;nbsp;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can refer to the blog to optimize the dax.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://powerbi.microsoft.com/en-us/blog/best-practice-rules-to-improve-your-models-performance/" target="_blank" rel="noopener"&gt;Best practice rules to improve your model&amp;amp;#8217;s performance | Microsoft Power BI Blog | Microsoft Power BI&lt;/A&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;1. Download and install Tabular Editor&amp;nbsp;.
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;2. Open Tabular Editor and run the following code in the&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;Advanced scripting window.&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;&amp;nbsp;
&lt;PRE&gt;&lt;SPAN class=""&gt;System.Net.WebClient w = &lt;SPAN class=""&gt;new&lt;SPAN class=""&gt; System.Net.WebClient(); 
&lt;SPAN class=""&gt;string&lt;SPAN class=""&gt; path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData);&lt;SPAN class=""&gt;string&lt;SPAN class=""&gt; url = &lt;SPAN class=""&gt;"https:&lt;SPAN class=""&gt;//raw.githubusercontent.com/microsoft/Analysis-Services/master/BestPracticeRules/BPARules.json"&lt;SPAN class=""&gt;;&lt;SPAN class=""&gt;string&lt;SPAN class=""&gt; downloadLoc = path+&lt;SPAN class=""&gt;@"\TabularEditor\BPARules.json"&lt;SPAN class=""&gt;;
w.DownloadFile(url, downloadLoc);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV&gt;&amp;nbsp;
&lt;DIV&gt;3. Close and reopen Tabular Editor.&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 01:51:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-calculating-if-there-was-a-product-placement-in-the/m-p/2914073#M95318</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-18T01:51:04Z</dc:date>
    </item>
  </channel>
</rss>

