<?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: Running Total of multiple measures in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3458820#M131884</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion.&lt;/P&gt;&lt;P&gt;Unfortunately, it did not help even with some minor measure tuning.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed my SQL query to get all customers id so I used calculate(count),status="Due". For overdue I created calculated column with the following logic: if status="Overdue" then return today date. then count of a new column with userrelationship in it. Then sum overdue+due. Another steps are similar.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2023 06:01:59 GMT</pubDate>
    <dc:creator>miracle2023</dc:creator>
    <dc:date>2023-10-04T06:01:59Z</dc:date>
    <item>
      <title>Running Total of multiple measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3455684#M131723</link>
      <description>&lt;P&gt;Hi folks!&lt;/P&gt;&lt;P&gt;I'm currenrly stucked with occured issue. I want to create measure over "PredictedDueOverdueStatic" measure which is given below. All my trials returned either very big number or the same number as "PredictedDueOverdueStatic" measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have DimDate table with single relationship with facttable[case_deadline] and employeetable[date].&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have following measures:&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;Current_overdue = 
CALCULATE(SUM(facttable[cases]),table[status]="Overdue")

Current_due = 
CALCULATE(SUM(facttable[cases]),table[status]="Due")

Sum = 
SUM(table[sum_cases])

Delivery = (105.5*[EmployeeAllocation])/28.6 
&amp;amp;&amp;amp;
EmployeeAllocation = 
var _fte = SUMX(FILTER(EmployeeTable,CONTAINSSTRING(EmployeeTable[TaskName],"highrisk")),EmployeeTable[declaredhours]/8)
var days = 
CALCULATE(
    DISTINCTCOUNT(EmployeeTable[Date]),
    FILTER(
        EmployeeTable,
        WEEKDAY([Date],2)&amp;lt;6
        &amp;amp;&amp;amp; EmployeeTable[Date] &amp;lt;= TODAY()
))
var _f = CALCULATE(DIVIDE(_fte,days,0))
return 
_f

PredictedDueOverdueStatic = 
[Sum] - [Delivery]


&lt;/LI-CODE&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Any help would be valuable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 11:01:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3455684#M131723</guid>
      <dc:creator>miracle2023</dc:creator>
      <dc:date>2023-10-02T11:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total of multiple measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3456489#M131763</link>
      <description>&lt;P&gt;Without the sample data (model) and/or the .pbix file tough to suggest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming you have YYYY-MM and use that in the visual and try first.&lt;/P&gt;
&lt;P&gt;Second step, replace with the year and month as separate columns&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;PredictedDueOverdueStatic = 

-- Running Total
IF (
   -- To avoid showing for no sum rows
   not ISBLANK(table[Sum]),  

-- RT Calculation
SUMX( 
   -- Get the list of all dates, in my case I have YYYY-MM in the visual
   filter(ALLSELECTED( 'Date'), 'Date'[YYYY-MM] &amp;lt;= SELECTEDVALUE('Date'[YYYY-MM]) ), 

   -- sum diff of two measures
   [Sum] - [Delivery]
) 

)
&lt;/LI-CODE&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;P&gt;---------- below works ------------------&lt;/P&gt;
&lt;P&gt;Based on the Adventure works dw 2020, I can recommend this ...&amp;nbsp;&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="csharp"&gt;-- Measures created
Total Sales = sum(Sales[Sales Amount])

North America Sales = 
SUMX( FILTER( ALLSELECTED('Sales Territory'), 'Sales Territory'[Group] = "North America" ), [Total Sales])

&lt;/LI-CODE&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;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RT measure:&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="csharp"&gt;RT Sales - Rest of the world = 

IF (
-- To avoid showing for no sales months
not ISBLANK(Sales[Total Sales]),  

-- RT Calculation
SUMX( 
   -- Get the list of all dates, in my case I have YYYY-MM in the visual
   filter(ALLSELECTED( 'Date'), 'Date'[YYYY-MM] &amp;lt;= SELECTEDVALUE('Date'[YYYY-MM]) ), 

   -- Sum diff of two measures
   [Total Sales] - [North America Sales]
) 

)&lt;/LI-CODE&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;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;Hope this gives some direction for your need!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 18:52:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3456489#M131763</guid>
      <dc:creator>sevenhills</dc:creator>
      <dc:date>2023-10-02T18:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total of multiple measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3458820#M131884</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion.&lt;/P&gt;&lt;P&gt;Unfortunately, it did not help even with some minor measure tuning.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed my SQL query to get all customers id so I used calculate(count),status="Due". For overdue I created calculated column with the following logic: if status="Overdue" then return today date. then count of a new column with userrelationship in it. Then sum overdue+due. Another steps are similar.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 06:01:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3458820#M131884</guid>
      <dc:creator>miracle2023</dc:creator>
      <dc:date>2023-10-04T06:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total of multiple measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3458821#M131885</link>
      <description>&lt;P&gt;Any help would be very valuable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 06:02:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3458821#M131885</guid>
      <dc:creator>miracle2023</dc:creator>
      <dc:date>2023-10-04T06:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total of multiple measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3466126#M132279</link>
      <description>&lt;P&gt;bump.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 05:32:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-of-multiple-measures/m-p/3466126#M132279</guid>
      <dc:creator>miracle2023</dc:creator>
      <dc:date>2023-10-09T05:32:30Z</dc:date>
    </item>
  </channel>
</rss>

