<?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 Pie Chart Problems - Can't Add Values for Totals Using Last Date Only in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2660344#M78857</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit to my original post as it wasn't clear! I'm having difficulty getting my pie chart to work. I have a source table that's like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Last Updated&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Asset Reference&lt;/TD&gt;&lt;TD&gt;Total Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/03/2022&lt;/TD&gt;&lt;TD&gt;Italy&lt;/TD&gt;&lt;TD&gt;aaa&lt;/TD&gt;&lt;TD&gt;4,324&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/03/2022&lt;/TD&gt;&lt;TD&gt;Italy&lt;/TD&gt;&lt;TD&gt;bbb&lt;/TD&gt;&lt;TD&gt;42&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2022&lt;/TD&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;ccc&lt;/TD&gt;&lt;TD&gt;56,540,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;16/03/2021&lt;/TD&gt;&lt;TD&gt;Italy&lt;/TD&gt;&lt;TD&g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t;657&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18/07/2019&lt;/TD&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;eee&lt;/TD&gt;&lt;TD&gt;65,765&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;17/07/2019&lt;/TD&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;eee&lt;/TD&gt;&lt;TD&gt;746&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;16/07/2019&lt;/TD&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;ddd&lt;/TD&gt;&lt;TD&gt;74&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15/07/2019&lt;/TD&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;ddd&lt;/TD&gt;&lt;TD&gt;5,435&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want a pie chart and a table to gather the total amount for each country using the latest date of each asset reference that is available and ignore values for any date prior to the latest date for that asset. So essentially, in table form (which i can also easily switch to a pie using the same logic) it would give me the following values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Total Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Italy&lt;/TD&gt;&lt;TD&gt;4,366&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;56,540,004&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I achieve this? All I am getting at the moment is a total amount for Country that sums up every value against every date for every asset reference. All I want is country totals that only adds values of assets with that have the latest date only for that asset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that makes sense! Any help would be really appreciated!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jul 2022 23:11:19 GMT</pubDate>
    <dc:creator>julesdude</dc:creator>
    <dc:date>2022-07-25T23:11:19Z</dc:date>
    <item>
      <title>Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2660344#M78857</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit to my original post as it wasn't clear! I'm having difficulty getting my pie chart to work. I have a source table that's like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Last Updated&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Asset Reference&lt;/TD&gt;&lt;TD&gt;Total Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/03/2022&lt;/TD&gt;&lt;TD&gt;Italy&lt;/TD&gt;&lt;TD&gt;aaa&lt;/TD&gt;&lt;TD&gt;4,324&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/03/2022&lt;/TD&gt;&lt;TD&gt;Italy&lt;/TD&gt;&lt;TD&gt;bbb&lt;/TD&gt;&lt;TD&gt;42&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2022&lt;/TD&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;ccc&lt;/TD&gt;&lt;TD&gt;56,540,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;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t;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;ddd&lt;/TD&gt;&lt;TD&gt;657&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18/07/2019&lt;/TD&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;eee&lt;/TD&gt;&lt;TD&gt;65,765&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;17/07/2019&lt;/TD&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;eee&lt;/TD&gt;&lt;TD&gt;746&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;16/07/2019&lt;/TD&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;ddd&lt;/TD&gt;&lt;TD&gt;74&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15/07/2019&lt;/TD&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;ddd&lt;/TD&gt;&lt;TD&gt;5,435&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want a pie chart and a table to gather the total amount for each country using the latest date of each asset reference that is available and ignore values for any date prior to the latest date for that asset. So essentially, in table form (which i can also easily switch to a pie using the same logic) it would give me the following values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Total Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Italy&lt;/TD&gt;&lt;TD&gt;4,366&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;56,540,004&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I achieve this? All I am getting at the moment is a total amount for Country that sums up every value against every date for every asset reference. All I want is country totals that only adds values of assets with that have the latest date only for that asset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that makes sense! Any help would be really appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 23:11:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2660344#M78857</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-07-25T23:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2660418#M78867</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399757" data-lia-user-login="julesdude" class="lia-mention lia-mention-user"&gt;julesdude&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used two calculated columns to achieve the below however I am confident this can be achieved more efficiently in some other way. Output below:&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;&lt;/P&gt;
&lt;P&gt;Two calculated columns are:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Max Date to return the latest date based on the country:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Max Date =&lt;BR /&gt;&lt;BR /&gt;VAR _1 = 'Table (2)'[Country]&lt;BR /&gt;VAR _2 = MAXX ( FILTER ( ALL ('Table (2)' ) , 'Table (2)'[Country] = _1 ) , 'Table (2)'[Last Updated] )&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;&lt;BR /&gt;_2&lt;/PRE&gt;
&lt;P&gt;2. Max Amount to return the maximum amount based on parameters specified:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Max Amount =&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;VAR _1 = CALCULATE ( MAX ('Table (2)'[Total Value] ) , ALLEXCEPT ( 'Table (2)' , 'Table (2)'[Country] ,'Table (2)'[Asset Reference] ,'Table (2)'[Last Updated] ) )&lt;BR /&gt;VAR _2 = IF ( AND ( _1 = 'Table (2)'[Total Value] , 'Table (2)'[Last Updated] = 'Table (2)'[Max Date] ) , _1 , 0 )&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;&lt;BR /&gt;_2&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Theo&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 00:51:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2660418#M78867</guid>
      <dc:creator>TheoC</dc:creator>
      <dc:date>2022-07-26T00:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2661592#M78939</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="96558" data-lia-user-login="TheoC" class="lia-mention lia-mention-user"&gt;TheoC&lt;/a&gt;&amp;nbsp;thank you I am very grateful for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think your solution might be difficult to implement for added DAX columns because in my example I did simplify things somewhat into one table. Technically I have two tables at work here (although they do have a relationship) which are joined by asset reference:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So if we are going to go the add column using DAX route, it might need to be modified?&lt;/P&gt;&lt;P&gt;Like you, I was thinking there could be a cleaner way of achieving this, but I'm happy to go with whatever works if the extra columns route is easier.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 10:09:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2661592#M78939</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-07-26T10:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2666338#M79271</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399757" data-lia-user-login="julesdude" class="lia-mention lia-mention-user"&gt;julesdude&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;
&lt;P&gt;You could create a measure.&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;total =
var _max=CALCULATE(MAX('TableA'[Date]),ALLEXCEPT(TableA,'TableA'[Country]))
return CALCULATE(SUM('TableB'[Total Value]),FILTER(TableB,[Date]=_max))&lt;/LI-CODE&gt;
&lt;P&gt;The final show:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 02:59:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2666338#M79271</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2022-07-28T02:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2666408#M79288</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399757" data-lia-user-login="julesdude" class="lia-mention lia-mention-user"&gt;julesdude&lt;/a&gt;&amp;nbsp;apologies! I hit Accept Solution instead of Reply. I will provide you a solution shortly!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 04:02:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2666408#M79288</guid>
      <dc:creator>TheoC</dc:creator>
      <dc:date>2022-07-28T04:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2666515#M79294</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399757" data-lia-user-login="julesdude" class="lia-mention lia-mention-user"&gt;julesdude&lt;/a&gt;&amp;nbsp;with the changes you require,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295629" data-lia-user-login="v-yalanwu-msft" class="lia-mention lia-mention-user"&gt;v-yalanwu-msft&lt;/a&gt;&amp;nbsp;has provided a good solution and I recommend that you accept this post as a solution if you can.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 06:09:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2666515#M79294</guid>
      <dc:creator>TheoC</dc:creator>
      <dc:date>2022-07-28T06:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667020#M79333</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295629" data-lia-user-login="v-yalanwu-msft" class="lia-mention lia-mention-user"&gt;v-yalanwu-msft&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="96558" data-lia-user-login="TheoC" class="lia-mention lia-mention-user"&gt;TheoC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get this error when I implement the DAX, I think because of the references to two different tables:&lt;/P&gt;&lt;P&gt;The syntax for Table A is incorrect.......etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;PRE&gt;total =
var _max=CALCULATE(MAX('TableA'[Date]),ALLEXCEPT(TableA,'TableA'[Country]))
return CALCULATE(SUM('TableB'[Total Value]),FILTER(TableB,[Date]=_max))&lt;/PRE&gt;&lt;P&gt;I had changed this to:&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;total = 
var _max=CALCULATE(MAX('Table B'[Date],ALLEXCEPT('Table A'[Country]))
return CALCULATE(SUM('Table B'[Value]),FILTER('Table B'Date]=_max))&lt;/LI-CODE&gt;&lt;P&gt;....to try use the date in Table B. The date in Table A isn't really relevant here because it's a last updated date more than anything else. It's the Date in Table B that I need to be the latest and have the MAX on to find the latest date for an asset reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So basically I need listed the country field from Table A which provides the list of countries, then from Table B to be a sum of the latest date values by asset reference (like in table in my OP), to give you a table split by country giving you the total of the latest asset values.&lt;/P&gt;&lt;P&gt;If you could help further then that would be great. I hope this makes sense.&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;</description>
      <pubDate>Thu, 28 Jul 2022 10:28:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667020#M79333</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-07-28T10:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667209#M79350</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="96558" data-lia-user-login="TheoC" class="lia-mention lia-mention-user"&gt;TheoC&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295629" data-lia-user-login="v-yalanwu-msft" class="lia-mention lia-mention-user"&gt;v-yalanwu-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This may explain a bit better:&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;</description>
      <pubDate>Thu, 28 Jul 2022 11:38:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667209#M79350</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-07-28T11:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667289#M79355</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399757" data-lia-user-login="julesdude" class="lia-mention lia-mention-user"&gt;julesdude&lt;/a&gt;&amp;nbsp;definitely.&amp;nbsp; Can you send the data you're working off and I'll put a solution together for you first thing in the morning!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 12:17:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667289#M79355</guid>
      <dc:creator>TheoC</dc:creator>
      <dc:date>2022-07-28T12:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667301#M79357</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399757" data-lia-user-login="julesdude" class="lia-mention lia-mention-user"&gt;julesdude&lt;/a&gt;&amp;nbsp; I have adapted &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295629" data-lia-user-login="v-yalanwu-msft" class="lia-mention lia-mention-user"&gt;v-yalanwu-msft&lt;/a&gt;&amp;nbsp;solution. Can you try this as a measure. Just adjust column names to what they are in your data.&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;LI-CODE lang="markup"&gt;Measure = 

VAR _1 = 

	CALCULATE ( 
		MAX ( 'Table'[Last Updated] ) ,
			ALLEXCEPT ( 'Table' , 'Table'[Country], 'Table'[Asset Reference] )
			)

RETURN

	CALCULATE ( 
		SUM ( 'Table'[Amount] ) ,
			FILTER ( 'Table'[Last Updated] = _1 )
			)
&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 12:26:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667301#M79357</guid>
      <dc:creator>TheoC</dc:creator>
      <dc:date>2022-07-28T12:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667490#M79374</link>
      <description>&lt;P&gt;Thanks so much&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="96558" data-lia-user-login="TheoC" class="lia-mention lia-mention-user"&gt;TheoC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only problem is that country needs to be called from the other table - Table A via the Asset Reference link. Will the above still work? I simplified the latest table so give an idea of what it should look like as one. But the country is looked up using the asset reference link:&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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 13:42:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667490#M79374</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-07-28T13:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667653#M79388</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="96558" data-lia-user-login="TheoC" class="lia-mention lia-mention-user"&gt;TheoC&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295629" data-lia-user-login="v-yalanwu-msft" class="lia-mention lia-mention-user"&gt;v-yalanwu-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached a sample workbook here removing unnecessary data and providing only needed columns as examples above. Data has been replaced slightly. :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Example" href="https://www.dropbox.com/t/yCGbupN3PO" target="_self"&gt;Example&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 15:04:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2667653#M79388</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-07-28T15:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2668119#M79454</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399757" data-lia-user-login="julesdude" class="lia-mention lia-mention-user"&gt;julesdude&lt;/a&gt;&amp;nbsp;okay, thanks so much for sending that through. Unfortunately, due to your Table B only having Asset References and no country, you cannot achieve what you are wanting because there is no way for Power BI to determine which Asset Reference is associated with which country.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, Both Italy and Egypt have the same Asset Reference (e.g. AAA can be either Italy or Egypt).&amp;nbsp; And, given you have linked Table A and Table B via a relationship at the Asset Reference level (&lt;STRONG&gt;which is NOT a unique key&lt;/STRONG&gt;), Power BI does not know which Country to return because there is nothing distinct or unique to identify the Country that the Asset Reference belongs to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that makes sense?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers mate.&lt;/P&gt;
&lt;P&gt;Theo&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 20:57:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2668119#M79454</guid>
      <dc:creator>TheoC</dc:creator>
      <dc:date>2022-07-28T20:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2668251#M79464</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="96558" data-lia-user-login="TheoC" class="lia-mention lia-mention-user"&gt;TheoC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for looking at it. It sort of makes sense. I was a bit lost when you said AAA can be either Italy or Egypt because TableA is listing distinct references and the country column provides the country membership they belong to.&lt;BR /&gt;So if you're saying that the DAX can't lookup this reference to begin summing assets for each country, how else can I do this?&lt;BR /&gt;I had a thought - what if I merged the two tables/queries in Power Query so that I create a new column in Table B called Country which lists the corresponding country based on the asset reference join of Table A to Table B. We would then get the following:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This could be better to work with as now all held in the same table, but I'd still be uncertain how the DAX would operate and call requiring the logic above?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 22:42:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2668251#M79464</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-07-28T22:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2668284#M79469</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399757" data-lia-user-login="julesdude" class="lia-mention lia-mention-user"&gt;julesdude&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As long as you have the ability to identify which Asset Reference belongs to which Country, then you can do it.&amp;nbsp; The issue in this instance, with the data that currently exists in Table A and Table B, it cannot be done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I was putting together a new measure for you which started with a LOOKUPVALUE as the first variable, it wasn't letting add 'Table A'[Country] as the third parameter being the Search Value.&amp;nbsp; The reason for this is because there's no way for Power BI to determine which Asset Reference belongs to a specific Country with respect to the population of data that currently exists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unless there is other data that you have which has not been shared, there is no way in which the outcome can be achieved unfortunately (from my understanding).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this makes sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Theo&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 23:09:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2668284#M79469</guid>
      <dc:creator>TheoC</dc:creator>
      <dc:date>2022-07-28T23:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2668294#M79472</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="96558" data-lia-user-login="TheoC" class="lia-mention lia-mention-user"&gt;TheoC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I'm afraid although I've simplified and I've taken a number of columns out that aren't relevant, this is all I've got that's relevant to this issue.&lt;BR /&gt;Ok, I have merged the query to bring a country reference column into table B so that I now have this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Updated file:&lt;/P&gt;&lt;P&gt;&lt;A title="File" href="https://www.dropbox.com/t/4nhw7uOvyB1G31BF" target="_self"&gt;File&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can your DAX above be adapted to now just reference this table in some way?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 23:34:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2668294#M79472</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-07-28T23:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2668348#M79480</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399757" data-lia-user-login="julesdude" class="lia-mention lia-mention-user"&gt;julesdude&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Okay, I am hoping based on all the back and forths, this is the right outcome you are wanting:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Basically, the measure is saying to only return the Amount for the Country and Asset Reference if the date is the Last Date, and then make everything else disappear (just from the table visual).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;SPAN&gt;Measure = &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_0&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;LASTDATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Date]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_1&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;LASTDATE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Date]&lt;/SPAN&gt;&lt;SPAN&gt; ) , &lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt; ,&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Country]&lt;/SPAN&gt;&lt;SPAN&gt; ,&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Asset Reference]&lt;/SPAN&gt;&lt;SPAN&gt; ) )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_2&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;_1&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;_0&lt;/SPAN&gt;&lt;SPAN&gt; , &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Amount]&lt;/SPAN&gt;&lt;SPAN&gt; ) , &lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;() )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;_2&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;After you shared the new data, it became a lot easier to follow. PBIX is attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please mark this as the correct solution if it is what you're after!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks heaps,&lt;/P&gt;
&lt;P&gt;Theo&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Jul 2022 00:55:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2668348#M79480</guid>
      <dc:creator>TheoC</dc:creator>
      <dc:date>2022-07-29T00:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Pie Chart Problems - Can't Add Values for Totals Using Last Date Only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2669099#M79516</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="96558" data-lia-user-login="TheoC" class="lia-mention lia-mention-user"&gt;TheoC&lt;/a&gt;&amp;nbsp;thank you so much for your time helping me on this.&lt;/P&gt;&lt;P&gt;And....it works perfectly for sub total values in the table.&lt;/P&gt;&lt;P&gt;The only issue now is that these are not reflected in the Grand Total, which is a problem because it is this total I'll need to be showing in the table I'm creating and the pie chart:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Can Grand Totals like this reference just the visible counterparts in the table? Is it even possible in Power BI?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for all your help with this.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 09:28:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pie-Chart-Problems-Can-t-Add-Values-for-Totals-Using-Last-Date/m-p/2669099#M79516</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-07-29T09:28:11Z</dc:date>
    </item>
  </channel>
</rss>

