<?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 sumX in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/sumX/m-p/3425124#M1136899</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this is a simple solution, but after reviewing and testing multiple potential solutions - still not quite there.&lt;/P&gt;&lt;P&gt;Wanting to calculate the time interval buckets for an AR/AP aging report.&amp;nbsp; &amp;nbsp;I have a measure that appears to be working correctly at the invoice level, but when summing to the vendor or grand total level, I have a blank.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is more most recent version of measure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AgingBucket &amp;gt;0 = 
Var Days = 0
//VAR MinBucket = [InvoiceDueDateM]+Days
//Var MaxBucket = minbucket+30
Var VendorTotal = sumx(VALUES(TADConsolidated[Vendor]),

    VAR MinBucket = [InvoiceDueDateM]+Days
    Var MaxBucket = minbucket+30
    Return    SWITCH(TRUE(),
        [MaxDate]&amp;gt;MinBucket&amp;amp;&amp;amp;[MaxDate]&amp;lt;=MaxBucket,[Net Invoice Due TEST],
        BLANK()))
 Return VendorTotal&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also attempted a calculate with a filter for data brackets, but get the error - SumX does not allow for boolean values, thus I found a reference of using a switch statement to work around.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I truly appreciate the Forum's generosity!&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2023 22:36:58 GMT</pubDate>
    <dc:creator>Dellis81</dc:creator>
    <dc:date>2023-09-11T22:36:58Z</dc:date>
    <item>
      <title>sumX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/sumX/m-p/3425124#M1136899</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this is a simple solution, but after reviewing and testing multiple potential solutions - still not quite there.&lt;/P&gt;&lt;P&gt;Wanting to calculate the time interval buckets for an AR/AP aging report.&amp;nbsp; &amp;nbsp;I have a measure that appears to be working correctly at the invoice level, but when summing to the vendor or grand total level, I have a blank.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is more most recent version of measure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AgingBucket &amp;gt;0 = 
Var Days = 0
//VAR MinBucket = [InvoiceDueDateM]+Days
//Var MaxBucket = minbucket+30
Var VendorTotal = sumx(VALUES(TADConsolidated[Vendor]),

    VAR MinBucket = [InvoiceDueDateM]+Days
    Var MaxBucket = minbucket+30
    Return    SWITCH(TRUE(),
        [MaxDate]&amp;gt;MinBucket&amp;amp;&amp;amp;[MaxDate]&amp;lt;=MaxBucket,[Net Invoice Due TEST],
        BLANK()))
 Return VendorTotal&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also attempted a calculate with a filter for data brackets, but get the error - SumX does not allow for boolean values, thus I found a reference of using a switch statement to work around.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I truly appreciate the Forum's generosity!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 22:36:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/sumX/m-p/3425124#M1136899</guid>
      <dc:creator>Dellis81</dc:creator>
      <dc:date>2023-09-11T22:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: sumX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/sumX/m-p/3425328#M1136961</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="152983" data-lia-user-login="Dellis81" class="lia-mention lia-mention-user"&gt;Dellis81&lt;/a&gt;&amp;nbsp;First, please vote for this idea: &lt;A href="https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e" target="_blank"&gt;https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This looks like a measure totals problem. Very common. See my post about it here: &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also: &lt;A href="https://youtu.be/uXRriTN0cfY" target="_blank"&gt;https://youtu.be/uXRriTN0cfY&lt;/A&gt;&lt;BR /&gt;And: &lt;A href="https://youtu.be/n4TYhF2ARe8" target="_blank"&gt;https://youtu.be/n4TYhF2ARe8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 02:04:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/sumX/m-p/3425328#M1136961</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-09-12T02:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: sumX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/sumX/m-p/3426361#M1137215</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;, thank you for responding and links.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen your posts in prior efforts, and agree - wrong totals are a real challenge.&amp;nbsp; &amp;nbsp;I had even voted for for this idea (provided link) sometime ago.&amp;nbsp; Good to know there are potential solutions coming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, I am still not getting your proposed measure working.&amp;nbsp; &amp;nbsp;The results still pulls a blank.&amp;nbsp; (I realize I still need to do the if onevalue component, but thought I would at least get the totals to pull in)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AgingBucket &amp;gt;0 Test = 

Var calcTable = SUMMARIZE(TADConsolidated,[Vendor],"__value",[AgingBucket &amp;gt;0])
Var VendorTotal1 = sumx(calcTable,[__value])

 Return
 VendorTotal1&lt;/LI-CODE&gt;&lt;P&gt;Here's my "single measure" in your terminology.&amp;nbsp; &amp;nbsp;Note, I have attempted to use a switch and an if statement to see if that helps in the totals calculates.&amp;nbsp; &amp;nbsp;Both methods return the same result.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AgingBucket &amp;gt;0 = 
Var Days = 0
VAR MinBucket = [InvoiceDueDateM]+Days
Var MaxBucket = minbucket+30
Var SingleM = 
    SWITCH(TRUE(),
        [MaxDate]&amp;gt;MinBucket&amp;amp;&amp;amp;[MaxDate]&amp;lt;=MaxBucket,[Net Invoice Due TEST],
        BLANK())

Var SingleM2 = if([MaxDate]&amp;gt;MinBucket&amp;amp;&amp;amp;[MaxDate]&amp;lt;=MaxBucket,[Net Invoice Due TEST],
        BLANK())

 Return
SingleM
//SingleM2&lt;/LI-CODE&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;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;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 12:37:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/sumX/m-p/3426361#M1137215</guid>
      <dc:creator>Dellis81</dc:creator>
      <dc:date>2023-09-12T12:37:05Z</dc:date>
    </item>
  </channel>
</rss>

