<?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: DAX required to provide percentage of a latest dated value for an item based on its group label in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2762439#M85667</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, that has certainly helped!! The Latest Value measure now provides the latest value for the Item Ref, so that is working.&lt;/P&gt;&lt;P&gt;For the Latest Val % it is also working too - I needed to set the format to percentage.&lt;/P&gt;&lt;P&gt;However, whilst I am getting the percentages, the ones displayed for an Item Ref in Supplier Ref collection don't all add to 100%. I do have a couple of report-wide filters applied to the visual, will the DAX above honour or disregard any existing filters used?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Sep 2022 16:15:40 GMT</pubDate>
    <dc:creator>julesdude</dc:creator>
    <dc:date>2022-09-12T16:15:40Z</dc:date>
    <item>
      <title>DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2757894#M85347</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I have the following table in my data model, made simple here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Item Value&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Item Ref&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Item Value&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Value Date&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Supplier Ref&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 20&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 13-04-2021&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Name1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 15&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 15-02-2022&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Name1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 25&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 15-07-2019&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Name1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 45&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 25-04-2019&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Name1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 40&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 01-02-2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Name1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 30&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 15-09-2021&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Name1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 22&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 29-10-2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Name2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 21&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 13-09-2019&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Name2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my report, I want to use DAX to display a table which takes only the latest Value for each Item Ref&amp;nbsp;(using the latest Value Date) and then gives the percentage of it's value against all the other items in the same Supplier Ref group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the above example, I'd expect that Item Ref 1 would qualify 15 (as that's the latest date provided for the value), and Item Ref 2, 30 (latest date value), and provide the percentage of those two for that group as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Item Ref&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; Item Percentage&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 33%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 66%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; 100%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already have the DAX to work out the latest value for a field:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ValueLastDate = &lt;/SPAN&gt;&lt;SPAN&gt;Calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(Item_Value&lt;/SPAN&gt;&lt;SPAN&gt;[Item Value]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;LASTDATE&lt;/SPAN&gt;&lt;SPAN&gt;(Item_Value&lt;/SPAN&gt;&lt;SPAN&gt;[Value Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to adapt the DAX below to fit my example but couldn't get it working and not sure if it's the right approach as I need to encompass the ValueLastDate logic above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Percent = DIVIDE ( SUMX ( 'Item_Value, 'Item_Value'[Value] ), CALCULATE ( SUM ( 'Item_Value'[Value] ), ALLEXCEPT ( 'Item_Value', 'Item_Value'[Supplier Ref] ) ) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Grateful for any help please.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 10:04:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2757894#M85347</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-09T10:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758331#M85389</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;It is for creating a new table.&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;LI-CODE lang="markup"&gt;New Table = 
VAR _maxdatetable =
    GROUPBY (
        Item_Value,
        Item_Value[Item Ref],
        "@maxdate", MAXX ( CURRENTGROUP (), Item_Value[Value Date] )
    )
VAR _maxdatevaluetable =
    CALCULATETABLE (
        Item_Value,
        TREATAS ( _maxdatetable, Item_Value[Item Ref], Item_Value[Value Date] )
    )
VAR _addsuppliervaluetotal =
    ADDCOLUMNS (
        _maxdatevaluetable,
        "@suppliertotal",
            SUMX (
                FILTER (
                    _maxdatevaluetable,
                    Item_Value[Supplier Ref] = EARLIER ( Item_Value[Supplier Ref] )
                ),
                Item_Value[Item Value]
            )
    )
RETURN
    SUMMARIZE (
        ADDCOLUMNS (
            _addsuppliervaluetotal,
            "@ratio", DIVIDE ( Item_Value[Item Value], [@suppliertotal] )
        ),
        Item_Value[Item Ref],
        [@ratio]
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 13:22:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758331#M85389</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-09-09T13:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758412#M85391</link>
      <description>&lt;P&gt;You can create a couple of measures like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Latest Value = IF( HASONEVALUE('Table'[Item Ref] ),
    var currentRef = SELECTEDVALUE('Table'[Item Ref])
    var latestVal = SELECTCOLUMNS( 
        CALCULATETABLE( TOPN( 1, 'Table', 'Table'[Value Date]), ALLEXCEPT('Table', 'Table'[Item Ref]) ),
        "@val", 'Table'[Item Value]
    )
    return latestVal
)

Latest val % = IF( HASONEVALUE('Table'[Item Ref]),
    var latestVal = [Latest Value]
    var totalVal = CALCULATE( SUMX( VALUES('Table'[Item Ref] ), [Latest Value]), ALLEXCEPT('Table', 'Table'[Supplier Ref]) )
    return DIVIDE( latestVal, totalVal )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Sep 2022 13:50:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758412#M85391</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-09-09T13:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758422#M85393</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;thanks so much - great code which I will look to use. I don't think I can use this though as a solution on this occasion because I have other columns already in my report table (I just simplified my above example, but there are many other columns already).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 13:52:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758422#M85393</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-09T13:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758518#M85397</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;I applied this but I'm getting the following error:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 14:20:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758518#M85397</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-09T14:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758528#M85398</link>
      <description>&lt;P&gt;Looks like you have multiple entries for the same Item Ref with the same value date. If you have a unique column in the table, like an ID, you can add that as an additional sort column to the TOPN. If you don't have one then you can use Power Query to create an index column, and use that. The code would then look like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Latest Value =
IF (
    HASONEVALUE ( 'Table'[Item Ref] ),
    VAR currentRef =
        SELECTEDVALUE ( 'Table'[Item Ref] )
    VAR latestVal =
        SELECTCOLUMNS (
            CALCULATETABLE (
                TOPN ( 1, 'Table', 'Table'[Value Date], DESC, 'Table'[Index], DESC ),
                ALLEXCEPT ( 'Table', 'Table'[Item Ref] )
            ),
            "@val", 'Table'[Item Value]
        )
    RETURN
        latestVal
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Sep 2022 14:24:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758528#M85398</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-09-09T14:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758539#M85399</link>
      <description>&lt;P&gt;Absolutely right&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll use M to put in an index column and try it out and report back. Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 14:29:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2758539#M85399</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-09T14:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2760601#M85546</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for getting back Friday. I had time to apply and create the Index column in PQ (just named 'Index').&lt;/P&gt;&lt;P&gt;Unfortunately the results are not giving me what I want. Dragging the measure Latest Val % to the table viz on the report gives me a column with 0% for each row. Dragging the Latest Value measure brings me the same value applied to each row - it's not zero but it's the same value all the way down.&lt;/P&gt;&lt;P&gt;One fortunate thing here is that this table in the data model has no reference to any other table in the data model - all data is aggregated from this one table that has been imported in.&lt;/P&gt;&lt;P&gt;You may know what the issue is, but perhaps I should explain again my scenario:&lt;/P&gt;&lt;P&gt;Here is my table in the data model:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Logic needs to be:&lt;/P&gt;&lt;P&gt;- Take each Supplier Ref group at a time ('Supplier1', 'Supplier2' etc.)&amp;nbsp; exploring the Item Refs in the collection&lt;/P&gt;&lt;P&gt;- Get the LAST Value Date for each Item Ref (highlighted green above)&lt;/P&gt;&lt;P&gt;- Sum each LATEST Item Ref value (green) to get the total for this Supplier Ref collection&lt;/P&gt;&lt;P&gt;- Divide the individual Item Value (highlighted green) against the above sum total of all last dated Item ref values (all the shaded green values for the supplier group) to get the percentage&lt;/P&gt;&lt;P&gt;- Repeat for the next supplier Ref - 'Supplier2' etc etc. to get the % of Item Refs in that collection and so forth.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The column should basically then provide the result in Column Result column in the above example.&lt;/P&gt;&lt;P&gt;In my report, the table displays like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Item Ref&amp;nbsp; &amp;nbsp; %&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12%&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25%&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 18%&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 45%&lt;/P&gt;&lt;P&gt;52&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 68%&lt;/P&gt;&lt;P&gt;6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 32%&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>Sun, 11 Sep 2022 23:30:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2760601#M85546</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-11T23:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2761329#M85601</link>
      <description>&lt;P&gt;Can you share a PBIX file, or some sample data which can be copied / pasted ?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 09:01:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2761329#M85601</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-09-12T09:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2761339#M85603</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks. Sure, you could use the sample data in my example? That ok?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pasted below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Item Ref&lt;/TD&gt;&lt;TD&gt;Item Value&lt;/TD&gt;&lt;TD&gt;Value Date&lt;/TD&gt;&lt;TD&gt;Supplier Ref&lt;/TD&gt;&lt;TD&gt;Index&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;13/04/2021&lt;/TD&gt;&lt;TD&gt;Supplier1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;15/02/2022&lt;/TD&gt;&lt;TD&gt;Supplier1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;15/07/2019&lt;/TD&gt;&lt;TD&gt;Supplier1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;TD&gt;25/04/2019&lt;/TD&gt;&lt;TD&gt;Supplier1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;01/02/2020&lt;/TD&gt;&lt;TD&gt;Supplier1&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;15/09/2021&lt;/TD&gt;&lt;TD&gt;Supplier1&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;29/10/2020&lt;/TD&gt;&lt;TD&gt;Supplier1&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;TD&gt;13/09/2019&lt;/TD&gt;&lt;TD&gt;Supplier1&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;55&lt;/TD&gt;&lt;TD&gt;21/10/2022&lt;/TD&gt;&lt;TD&gt;Supplier1&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;73&lt;/TD&gt;&lt;TD&gt;14/07/2021&lt;/TD&gt;&lt;TD&gt;Supplier2&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;44&lt;/TD&gt;&lt;TD&gt;15/06/2020&lt;/TD&gt;&lt;TD&gt;Supplier2&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;85&lt;/TD&gt;&lt;TD&gt;02/06/2019&lt;/TD&gt;&lt;TD&gt;Supplier2&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;36&lt;/TD&gt;&lt;TD&gt;05/07/2018&lt;/TD&gt;&lt;TD&gt;Supplier2&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;TD&gt;04/06/2017&lt;/TD&gt;&lt;TD&gt;Supplier2&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;TD&gt;14/07/2021&lt;/TD&gt;&lt;TD&gt;Supplier2&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;42&lt;/TD&gt;&lt;TD&gt;21/02/2020&lt;/TD&gt;&lt;TD&gt;Supplier2&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;67&lt;/TD&gt;&lt;TD&gt;29/01/2019&lt;/TD&gt;&lt;TD&gt;Supplier2&lt;/TD&gt;&lt;TD&gt;17&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 12 Sep 2022 09:05:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2761339#M85603</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-12T09:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2761358#M85605</link>
      <description>&lt;P&gt;The code I gave is working when I try it against this sample data&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Latest Value = 
IF (
    HASONEVALUE ( 'Table'[Item Ref] ),
    VAR currentRef =
        SELECTEDVALUE ( 'Table'[Item Ref] )
    VAR latestVal =
        SELECTCOLUMNS (
            CALCULATETABLE (
                TOPN ( 1, 'Table', 'Table'[Value Date], DESC, 'Table'[Index], DESC ),
                ALLEXCEPT ( 'Table', 'Table'[Item Ref] )
            ),
            "@val", 'Table'[Item Value]
        )
    RETURN
        latestVal
)

Latest val % = IF( HASONEVALUE('Table'[Item Ref]),
    var latestVal = [Latest Value]
    var totalVal = CALCULATE( SUMX( VALUES('Table'[Item Ref] ), [Latest Value]), ALLEXCEPT('Table', 'Table'[Supplier Ref]) )
    return DIVIDE( latestVal, totalVal )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 12 Sep 2022 09:14:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2761358#M85605</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-09-12T09:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2761939#M85638</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's really strange. The only thing I can think of - I did simplify it in my example, but in my report table I am linking it to another table in the data model with details about the individual items - name, country of origin etc. just to bring them in to the table. It's linked in the data model like so:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Item Details table in model:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Item Ref&lt;/TD&gt;&lt;TD&gt;Item Name&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Name1&lt;/TD&gt;&lt;TD&gt;UK&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Name2&lt;/TD&gt;&lt;TD&gt;FR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Name3&lt;/TD&gt;&lt;TD&gt;FR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Name4&lt;/TD&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Name6&lt;/TD&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;Name52&lt;/TD&gt;&lt;TD&gt;UK&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The resulting table in the report would bring in some details from this other table, ideally looking like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But I wouldn't of thought this would upset any of the DAX you've provided.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do any of the columns need to be sorted in an order in Power Query at the transformation stage before the DAX kicks in?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 12:53:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2761939#M85638</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-12T12:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2761960#M85640</link>
      <description>&lt;P&gt;In the Latest Val measure, the ALLEXCEPT needs to refer to the column you are using in the visual. You can use the column from either table, doesn't matter, but they need to match&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 13:03:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2761960#M85640</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-09-12T13:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2762439#M85667</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, that has certainly helped!! The Latest Value measure now provides the latest value for the Item Ref, so that is working.&lt;/P&gt;&lt;P&gt;For the Latest Val % it is also working too - I needed to set the format to percentage.&lt;/P&gt;&lt;P&gt;However, whilst I am getting the percentages, the ones displayed for an Item Ref in Supplier Ref collection don't all add to 100%. I do have a couple of report-wide filters applied to the visual, will the DAX above honour or disregard any existing filters used?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 16:15:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2762439#M85667</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-12T16:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2762453#M85668</link>
      <description>&lt;P&gt;It would honour any filters applied to other tables, which could pass via relationships to the Item tables. If you wanted to remove those filters as well you could add ALL('Table1')&amp;nbsp; into the CALCULATE statement, you'd need to add one clause for each table you want to clear the filters on.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 16:22:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2762453#M85668</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-09-12T16:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2762840#M85691</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for helping me with this.&lt;/P&gt;&lt;P&gt;RIght.....with a bit more pulling apart this evening, it looks like it is indeed related to the report-wide filters I'm applying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, there are two report-wide filters, but I think number 1 is the main culprit:&lt;/P&gt;&lt;P&gt;#1 - filters out any Item Ref in the Item Details Table (left) that is marked 'Sold' in a column I didn't illustrate originally called Custom1.&lt;/P&gt;&lt;P&gt;#2 = filters out any Item Ref that has a category label of 'Sale' in a column I didn't include in the example but is part of a table not really referenced here.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;It takes out the odd Item Ref with the 'Sold' label in Custom, and if I remove this filter from the filter pane, I get all the Item Refs of the collection that total 100% if added together.&lt;/P&gt;&lt;P&gt;What am I missing here? Is there a way I can honour the filter or allow the filter to be report-wide but for the column to calculate percentages to treat the collection as all except those that are labelled Sold in the Custom column? That way the Item Ref percentages that are listed in the resulting table all add to 100%&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>Tue, 13 Sep 2022 00:40:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2762840#M85691</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-13T00:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2763738#M85747</link>
      <description>&lt;P&gt;If you're using the Item Ref from the Item Details table in your visual, and so using that in the ALLEXCEPT in the % calculation, you could add the Custom column to the ALLEXCEPT. If you're using the other version of Item Ref you could just add another ALLEXCEPT on the Item Details table&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 08:28:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2763738#M85747</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-09-13T08:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2763812#M85754</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be against the % measure? The percentages were still being calculated encompassing the Sold Item Refs in the Custom column.&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;Latest val % = IF( HASONEVALUE('Table'[Item Ref]),
    var latestVal = [Latest Value]
    var totalVal = CALCULATE( SUMX( VALUES('Table'[Item Ref] ), [Latest Value]), ALLEXCEPT('Table', 'Table'[Supplier Ref]), ALLEXCEPT('Table', 'Table'[Custom]) )
    return DIVIDE( latestVal, totalVal )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Item Ref Table:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Item Ref&lt;/TD&gt;&lt;TD&gt;Item Name&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Custom1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Name1&lt;/TD&gt;&lt;TD&gt;UK&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Name2&lt;/TD&gt;&lt;TD&gt;FR&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Name3&lt;/TD&gt;&lt;TD&gt;FR&lt;/TD&gt;&lt;TD&gt;Sold&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Name4&lt;/TD&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Name6&lt;/TD&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;Name52&lt;/TD&gt;&lt;TD&gt;UK&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 13 Sep 2022 08:55:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2763812#M85754</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-13T08:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2763819#M85757</link>
      <description>&lt;P&gt;That's right.&lt;/P&gt;
&lt;P&gt;If both columns are on the same table you can combine the 2 ALLEXCEPTs into 1, e.g.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Latest val % = IF( HASONEVALUE('Table'[Item Ref]),
    var latestVal = [Latest Value]
    var totalVal = CALCULATE( SUMX( VALUES('Table'[Item Ref] ), [Latest Value]), ALLEXCEPT('Table', 'Table'[Supplier Ref], 'Table'[Custom]) )
    return DIVIDE( latestVal, totalVal )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Sep 2022 08:58:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2763819#M85757</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-09-13T08:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: DAX required to provide percentage of a latest dated value for an item based on its group label</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2766858#M85966</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;Hi&lt;/P&gt;&lt;P&gt;Thanks again for all your help here. I began testing with the script above and realised that in the above code I would need two ALLEXCEPT commands as it might need to negate filters imposed on other tables that might themselves be filtering out the Item Refs required.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the end I could see this getting messy.&lt;/P&gt;&lt;P&gt;As a solution (appreciate may not be the best way), I looked again at whether I actually need these filters applied at report-wide level. The answer was no because I do not need to offer an ability for the user to switch these on or off. For this report, it will always be in one state and the filter will never be removed.&lt;BR /&gt;Therefore I looked again at the transform stage of the data and decided to merge queries to other tables joined by Item Ref - bringing across from the source table only the column where there is a label of sold or not. Then the final step to just filter on all rows that don't contain Sold so that we get datasets only with the relevant data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This allows your original DAX solution to work. The percentages were split based on the value of all those in the collection - and none were in the collection that shouldn't be there and needed fitlering out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 09:55:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-required-to-provide-percentage-of-a-latest-dated-value-for/m-p/2766858#M85966</guid>
      <dc:creator>julesdude</dc:creator>
      <dc:date>2022-09-14T09:55:48Z</dc:date>
    </item>
  </channel>
</rss>

