<?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: measure with different offsets on date, depending on data coming from 2 facts table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1477653#M28151</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have tryed&lt;/P&gt;&lt;P&gt;total load :=&lt;BR /&gt;SUMX (&lt;BR /&gt;&amp;nbsp; 'schedule';&lt;BR /&gt;&amp;nbsp; 'schedule'[quantity]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * CALCULATE (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES ( 'ressource_per_tasks'[UN_load] );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILTER (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'ressource_per_tasks';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'ressource_per_tasks'[tasks] = 'schedule'[tasks]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILTER (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Calendar';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Calendar'[date] = 'schedule'[ending date] + MAX('ressource_per_tasks'[offset])&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;With "MAX", I have "remove" an error about "not unique value for offset column".&lt;/P&gt;&lt;P&gt;But when I try to use the mesure in a pivot table, I get a "calculation error with the measure : a table with several values have been provided, but a unique value was expected".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Do you have an idee to solve that ?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2020 23:21:54 GMT</pubDate>
    <dc:creator>arq52</dc:creator>
    <dc:date>2020-11-05T23:21:54Z</dc:date>
    <item>
      <title>measure with different offsets on date, depending on data coming from 2 facts table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1462000#M27598</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;Hello,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="tlid-translation translation"&gt;I have a task table, with due dates and quantities:&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;A table of resources requested per task, different steps with the unit load and a number of days in advance of the due date:&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;Current connections:&lt;BR /&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;I'm trying to calculate the workload by resource, per weeks generated by these tasks, thanks to the offset from the due date. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&amp;nbsp;&amp;nbsp; * total load = UN_load * quantity&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * each of these loads positioned at ending date + offset&lt;BR /&gt;Expected "results" :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;img /&gt;&lt;BR /&gt;I would know how to do this with powerquery, but with my actual datas, it would make me generate a results file of over 2 million records. I guess that it may be feasable with dax with 10 to 20 times less recordings.&lt;BR /&gt;Thank you in advance for your help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 22:33:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1462000#M27598</guid>
      <dc:creator>arq52</dc:creator>
      <dc:date>2020-10-28T22:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: measure with different offsets on date, depending on data coming from 2 facts table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1477653#M28151</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have tryed&lt;/P&gt;&lt;P&gt;total load :=&lt;BR /&gt;SUMX (&lt;BR /&gt;&amp;nbsp; 'schedule';&lt;BR /&gt;&amp;nbsp; 'schedule'[quantity]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * CALCULATE (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES ( 'ressource_per_tasks'[UN_load] );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILTER (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'ressource_per_tasks';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'ressource_per_tasks'[tasks] = 'schedule'[tasks]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILTER (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Calendar';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Calendar'[date] = 'schedule'[ending date] + MAX('ressource_per_tasks'[offset])&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;With "MAX", I have "remove" an error about "not unique value for offset column".&lt;/P&gt;&lt;P&gt;But when I try to use the mesure in a pivot table, I get a "calculation error with the measure : a table with several values have been provided, but a unique value was expected".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Do you have an idee to solve that ?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 23:21:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1477653#M28151</guid>
      <dc:creator>arq52</dc:creator>
      <dc:date>2020-11-05T23:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: measure with different offsets on date, depending on data coming from 2 facts table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1477726#M28155</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="64728" data-lia-user-login="arq52" class="lia-mention lia-mention-user"&gt;arq52&lt;/a&gt;&amp;nbsp; i got the result you expected&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Load_Date:=IF(COUNTROWS('resource_per_task')*COUNTROWS('schedule'),MAX('schedule'[ending date])+MAX('resource_per_task'[offset]))
****************************************
Total_Load:=IF(COUNTROWS('resource_per_task')*COUNTROWS('schedule'),MAX('schedule'[quantity])*MAX('resource_per_task'[UN_load]))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 06 Nov 2020 00:52:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1477726#M28155</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2020-11-06T00:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: measure with different offsets on date, depending on data coming from 2 facts table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1487661#M28506</link>
      <description>&lt;P&gt;Thank you Daniel,&lt;/P&gt;&lt;P&gt;Not far from what I'm expecting, but I want to be able to do pivot table and link the load to the calendar date. With this measure, the load is linked to the ending date and not to the "load date":&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 14:41:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1487661#M28506</guid>
      <dc:creator>arq52</dc:creator>
      <dc:date>2020-11-11T14:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: measure with different offsets on date, depending on data coming from 2 facts table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1488685#M28555</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="64728" data-lia-user-login="arq52" class="lia-mention lia-mention-user"&gt;arq52&lt;/a&gt;&amp;nbsp; is this what you want?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Total Load :=
SUMX (
    CROSSJOIN (
        VALUES ( task[tasks] ),
        VALUES ( resource_per_task[resource] ),
        VALUES ( 'Calendar'[Date] )
    ),
    VAR _CurrentDate = 'Calendar'[Date]
    VAR _EndingDate =
        CALCULATE ( MIN ( schedule[ending date] ), 'Calendar'[Date] &amp;gt;= _CurrentDate )
    VAR _Offset =
        CALCULATE ( SUM ( resource_per_task[offset] ) )
    VAR _Load =
        CALCULATE ( SUM ( schedule[quantity] ), 'Calendar'[Date] = _EndingDate )
            * CALCULATE ( SUM ( resource_per_task[UN_load] ) )
    RETURN
        IF ( _CurrentDate = _EndingDate + _Offset, _Load )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 12 Nov 2020 03:10:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1488685#M28555</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2020-11-12T03:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: measure with different offsets on date, depending on data coming from 2 facts table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1489136#M28584</link>
      <description>&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;it's perfect!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now just to check the performance point of vue with my real datas.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 07:45:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/measure-with-different-offsets-on-date-depending-on-data-coming/m-p/1489136#M28584</guid>
      <dc:creator>arq52</dc:creator>
      <dc:date>2020-11-12T07:45:15Z</dc:date>
    </item>
  </channel>
</rss>

