<?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: Make Negative Values Zero at a Rolled Up Level in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589712#M138570</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;I emailed you the .pbix.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Dec 2023 19:56:14 GMT</pubDate>
    <dc:creator>Jerid421</dc:creator>
    <dc:date>2023-12-18T19:56:14Z</dc:date>
    <item>
      <title>Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3573202#M137763</link>
      <description>&lt;P&gt;I am trying develop a measure, OpenQuantityRT, to recreate a business process that is currently being done manually in a spreadsheet.&amp;nbsp; The end user sums up quantities ("In-Stock Materials"; 'SupplyDemandItems'[MRPElementOpenQuantity]) by their different statuses (some are ear-marked for assembly, some are already shipped, etc.; 'SupplyDemandItems'[MRPElementCategoryShortName]).&amp;nbsp; They are represented with negative numbers against the Stock-On-Hand number (also a MRPElementCategoryShortName), to reduce it.&amp;nbsp; Sometimes, the number of units earmarked for assembly is greater than the number actually available.&amp;nbsp; This skews the running total (this, and all previous weeks / years) of these quantites, as you can't earmark units that aren't actually available.&amp;nbsp; So, in the spreadsheet, these negative sums are "zeroed" out with an IF() formula after a pivot rolls them up to the Material level. Again, this decision is made after all the plusses and minuses are calculated and the total for each Material SKU is determined to be less than zero.&amp;nbsp; Because this OpenQuantityRT measure is a function of the cost, it also affects the OpenQuantityExtCostRT (Open Quantity Extended Cost Rolling Total) measure, which takes these quantities and multiplies them by their associated price.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Here is my attempt at making these values zero out when they are rolled up to a Material level:&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;OpenQuantityRT_Test =
VAR __MaterialLevel =
    ISINSCOPE ( SupplyDemandItems[Material] )
VAR __ElementCategoryLevel =
    ISINSCOPE ( SupplyDemandItems[MRPElementCategoryShortName] )
VAR __Qty =
    SUMX (
        SupplyDemandItems,
        IF (
            __MaterialLevel &amp;amp;&amp;amp; __ElementCategoryLevel,
            SupplyDemandItems[MRPElementOpenQuantity],
            -- Show negatives at detailed level
            IF (
                SupplyDemandItems[MRPElementOpenQuantity] &amp;lt; 0,
                0,
                -- Show zeros at Material level
                SupplyDemandItems[MRPElementOpenQuantity]
            )
        )
    )
VAR __QtyRT =
    CALCULATE (
        __Qty,
        FILTER (
            ALL ( 'Date Calendar' ),
            'Date Calendar'[YearWeekNum] &amp;lt;= MAX ( 'Date Calendar'[YearWeekNum] )
        )
    )
VAR __Tst1 =
    IF ( __MaterialLevel &amp;amp;&amp;amp; __ElementCategoryLevel &amp;amp;&amp;amp; __QtyRT &amp;lt; 0, 1, 0 )
VAR __Tst2 =
    IF ( __QtyRT &amp;lt; 0, 1, 0 )
RETURN
    __Tst1&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;Here is the matrix. &lt;STRONG&gt;I need to get the red box to be zero if the sum of all the rows below it sum to less than zero.&lt;/STRONG&gt; If their sum is positive, it just does the regular math.&amp;nbsp; &amp;nbsp;The green boxes should should show the negative totals, so I didn't reference them with the "RT" measures.&amp;nbsp;&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;Also, this is kind of a two-fold question. I tried to implement this "zero-out" code by using ISINSCOPE() with a little success, but only in a matrix visualization. I am worried that this will not work when I use the measure in a line chart and the Material and MRPElementCategoryShortName are not being used.&amp;nbsp; Is this the right approach?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 14:33:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3573202#M137763</guid>
      <dc:creator>Jerid421</dc:creator>
      <dc:date>2023-12-08T14:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3574649#M137821</link>
      <description>&lt;P&gt;This is the code I am currently working with:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;OpenQuantityRT_AllScopes = 
VAR __IsMaterialLevel =
    ISINSCOPE('SupplyDemandItems'[Material])
VAR __IsElementCategoryLevel =
    ISINSCOPE('SupplyDemandItems'[MRPElementCategoryShortName])
VAR __CurrentYearWeek =
    MAX('Date Calendar'[YearWeekNum])
VAR __RegularRollingTotal =
    CALCULATE(
        SUM('SupplyDemandItems'[MRPElementOpenQuantity]),
        FILTER(
            ALL('Date Calendar'),
            'Date Calendar'[YearWeekNum] &amp;lt;= __CurrentYearWeek
        )
    )
VAR __MaterialLevelandUpRollingTotal =
    IF(
        __IsMaterialLevel,
        CALCULATE(
            __RegularRollingTotal,
            ALLEXCEPT('SupplyDemandItems', 'SupplyDemandItems'[Material])
        ),
        BLANK()
    )
RETURN
    IF(
        __IsElementCategoryLevel,
        __RegularRollingTotal, // Detailed level shows actuals, including negatives
        MAX(__MaterialLevelandUpRollingTotal, 0) // Material level and up zero out if negative
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 08 Dec 2023 15:08:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3574649#M137821</guid>
      <dc:creator>Jerid421</dc:creator>
      <dc:date>2023-12-08T15:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3582724#M138225</link>
      <description>&lt;P&gt;My newest code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;OpenQuantityRT_Test3 = 
// Determines if the current context is at the MRPElementCategoryShortName level
VAR __IsElementCategoryLevel =
    ISINSCOPE('SupplyDemandItems'[MRPElementCategoryShortName])

// Retrieves the maximum YearWeekNum from the Date Calendar table for the current context, to implement the "Running Total" 
VAR __CurrentYearWeek =
    MAX('Date Calendar'[YearWeekNum])

// Corrects the SupplyDemandItems quantities by setting them to zero if their cumulative total is negative
VAR __CorrectedSupplyDemandItems =
    ADDCOLUMNS(
        'SupplyDemandItems',
        "CorrectedQuantity", 
        IF(
            CALCULATE(
                SUM('SupplyDemandItems'[MRPElementOpenQuantity]),
                FILTER(ALL('SupplyDemandItems'), 'SupplyDemandItems'[Material] = EARLIER('SupplyDemandItems'[Material]))
            ) &amp;lt; 0,
            0,
            'SupplyDemandItems'[MRPElementOpenQuantity]
        )
    )

// Calculates the rolling total without negatives for the Material level and up
VAR __RollingTotalNoNegs =
    CALCULATE(
        SUMX(
            __CorrectedSupplyDemandItems,
            [CorrectedQuantity]
        ),
        FILTER(
            ALL('Date Calendar'),
            'Date Calendar'[YearWeekNum] &amp;lt;= __CurrentYearWeek
        )
    )

// Calculates the regular rolling total for the ElementCategory level
VAR __RegularRollingTotal =
    CALCULATE(
        SUM('SupplyDemandItems'[MRPElementOpenQuantity]),
        FILTER(
            ALL('Date Calendar'),
            'Date Calendar'[YearWeekNum] &amp;lt;= __CurrentYearWeek
        )
    )

// Returns the appropriate rolling total based on the current context level
RETURN
    IF(
        __IsElementCategoryLevel,
        __RegularRollingTotal,
        MAX(__RollingTotalNoNegs, 0)
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 13 Dec 2023 21:22:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3582724#M138225</guid>
      <dc:creator>Jerid421</dc:creator>
      <dc:date>2023-12-13T21:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3584574#M138289</link>
      <description>&lt;P&gt;I came at it a different way and I think it's better, but now it doesn't seem to be calculating the rolling total correctly (at all):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OpenQuantityRT =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Determines if the current context is at the MRPElementCategoryShortName level&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;__IsElementCategoryLevel&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ISINSCOPE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'SupplyDemandItems'&lt;/SPAN&gt;&lt;SPAN&gt;[MRPElementCategoryShortName]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Retrieves the maximum YearWeekNum from the Date Calendar table for the current context, to implement the "Running Total" &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;__CurrentYearWeek&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[YearWeekNum]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Corrects the SupplyDemandItems quantities by setting them to zero if their cumulative total is negative&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;__CorrectedSupplyDemandItems&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'SupplyDemandItems'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"CorrectedQuantity"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'SupplyDemandItems'&lt;/SPAN&gt;&lt;SPAN&gt;[MRPElementOpenQuantity]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'SupplyDemandItems'&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;'SupplyDemandItems'&lt;/SPAN&gt;&lt;SPAN&gt;[Material]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'SupplyDemandItems'&lt;/SPAN&gt;&lt;SPAN&gt;[Material]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ) &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'SupplyDemandItems'&lt;/SPAN&gt;&lt;SPAN&gt;[MRPElementOpenQuantity]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Calculates the rolling total without negatives for the Material level and up&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;__RollingTotalNoNegs&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;__CorrectedSupplyDemandItems&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[CorrectedQuantity]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Date Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[YearWeekNum]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;__CurrentYearWeek&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Calculates the regular rolling total for the ElementCategory level&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;__RegularRollingTotal&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'SupplyDemandItems'&lt;/SPAN&gt;&lt;SPAN&gt;[MRPElementOpenQuantity]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Date Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[YearWeekNum]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;__CurrentYearWeek&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Returns the appropriate rolling total based on the current context level&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;__IsElementCategoryLevel&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;__RegularRollingTotal&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;__RollingTotalNoNegs&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Dec 2023 19:48:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3584574#M138289</guid>
      <dc:creator>Jerid421</dc:creator>
      <dc:date>2023-12-14T19:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589154#M138543</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="90550" data-lia-user-login="Jerid421" class="lia-mention lia-mention-user"&gt;Jerid421&lt;/a&gt;&amp;nbsp;Any chance you can share some sample data? Seems like you have a mix of a running total problem as well as measure totals. This may help the most:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Matrix-Measure-Total-Triple-Threat-Rock-amp-Roll/m-p/411443#M150" target="_blank"&gt;Matrix Measure Total Triple Threat Rock &amp;amp; Roll - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 14:38:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589154#M138543</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-12-18T14:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589246#M138546</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; I can't post it here, but I can share it with you individually.&amp;nbsp; Should I do that via PM?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 15:12:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589246#M138546</guid>
      <dc:creator>Jerid421</dc:creator>
      <dc:date>2023-12-18T15:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589541#M138561</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="90550" data-lia-user-login="Jerid421" class="lia-mention lia-mention-user"&gt;Jerid421&lt;/a&gt;&amp;nbsp;You can email or share it with gdeckler@gmail.com&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 17:16:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589541#M138561</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-12-18T17:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589707#M138569</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; I emailed you the .pbix.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 19:55:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589707#M138569</guid>
      <dc:creator>Jerid421</dc:creator>
      <dc:date>2023-12-18T19:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589712#M138570</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;I emailed you the .pbix.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 19:56:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3589712#M138570</guid>
      <dc:creator>Jerid421</dc:creator>
      <dc:date>2023-12-18T19:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3595015#M138894</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; &amp;nbsp;Did you receive the file?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 21:52:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3595015#M138894</guid>
      <dc:creator>Jerid421</dc:creator>
      <dc:date>2023-12-20T21:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3610388#M139557</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="90550" data-lia-user-login="Jerid421" class="lia-mention lia-mention-user"&gt;Jerid421&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Have you solved your problem?&lt;BR /&gt;If not,&amp;nbsp;It's hard to see what the problem is just by looking at the DAX. If you are concerned about data security etc, please create a simplified version of the pbix file that contains only the field data referenced by the matrix, the metrics and the matrix visual in the file will be fine. Then post this simplified version of the pbix file to the thread. Thanks!&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Dino Tao&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 07:19:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3610388#M139557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-02T07:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Make Negative Values Zero at a Rolled Up Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3636397#M140679</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; &amp;nbsp;I sent you a private message... did you get it?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 17:14:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-Negative-Values-Zero-at-a-Rolled-Up-Level/m-p/3636397#M140679</guid>
      <dc:creator>Jerid421</dc:creator>
      <dc:date>2024-01-12T17:14:21Z</dc:date>
    </item>
  </channel>
</rss>

