<?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 command to show top 4/bottom 4 variances in a matrix table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3522251#M135300</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you have placehholder error&amp;nbsp;&lt;BR /&gt;use your measure inside of filter ()&lt;BR /&gt;refer below solved&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Placeholder-error/m-p/3493955#M1155768" target="_blank" rel="noopener"&gt;LINK&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2023 11:07:46 GMT</pubDate>
    <dc:creator>Dangar332</dc:creator>
    <dc:date>2023-11-08T11:07:46Z</dc:date>
    <item>
      <title>DAX command to show top 4/bottom 4 variances in a matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3521341#M135262</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm pretty new to Power BI so I might be missing an easier way of doing this. I'm trying to show the top 4 and bottom four variances from estimated value to actual value. The only way I've been able to display this is using a matrix table and using two measures, for rank and for variance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to limit the number of entries shown to four each but have had no success. I found a youtube video that shows how to do it but I'm getting a 'A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.' when using it with my variables used.&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;From what I've read I need to use a FILTER function to fix this, but I'm not sure where. Any advice/ideas how to achieve what I'm after?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 05:08:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3521341#M135262</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-08T05:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to show top 4/bottom 4 variances in a matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3522122#M135293</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, you have syntax issues and PBI is showing you where.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR _Losers = FILTER(..)&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 10:18:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3522122#M135293</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-11-08T10:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to show top 4/bottom 4 variances in a matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3522146#M135294</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;as far as I understood, there should be some measure that results in a a switch to show either the bottom records or the top records. To my knowledge one can only filter by table columns in Power BI (anybody correct me, if I am wrong). Anyway let's try a different approach.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do some simualtion to get some toy data:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TransactionIDs =
GENERATESERIES ( 1, 50, 1 )

TransactionIDs =
GENERATESERIES ( 1, 50, 1 )

Transactions =
CROSSJOIN ( EntityIDs, TransactionIDs )

Variation =
SUMMARIZE (
    Transactions,
    Transactions[EntityID],
    "Variation", [VariationMeasure]
)

VariationMeasure =
STDEV.P ( Transactions[Value] )
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is giving me values for some entities where I want to know bottom and top.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A calcuated column now qualifies a record as bottom or top or neither of the two.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TopOrBottom =
VAR entityID = Variation[EntityID]
VAR tops =
    FILTER (
        TOPN ( 4, ALL ( Variation ), Variation[Variation], DESC ),
        [EntityID] = entityId
    )
VAR bottoms =
    FILTER (
        TOPN ( 4, ALL ( Variation ), Variation[Variation] * -1, DESC ),
        [EntityID] = entityId
    )
VAR istop =
    COUNTROWS ( tops ) == 1
VAR isbottom =
    COUNTROWS ( bottoms ) == 1
RETURN
    IF ( isbottom, "IsBottom", IF ( istop, "IsTop", BLANK () ) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The TopN DAX command just gives you the top n records according to one of the table's columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table looks like&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now, a filter can be applied to only show the tops or bottoms (if yo don't like the blank you can do a helper filter table without the blank and filter the above table with reference to the TopOrBottom field.&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;Hope this helps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 10:24:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3522146#M135294</guid>
      <dc:creator>scee07</dc:creator>
      <dc:date>2023-11-08T10:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to show top 4/bottom 4 variances in a matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3522251#M135300</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you have placehholder error&amp;nbsp;&lt;BR /&gt;use your measure inside of filter ()&lt;BR /&gt;refer below solved&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Placeholder-error/m-p/3493955#M1155768" target="_blank" rel="noopener"&gt;LINK&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 11:07:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3522251#M135300</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-11-08T11:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to show top 4/bottom 4 variances in a matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3523689#M135377</link>
      <description>&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for responding, unforutnately I need to show top + bottom at the same time in the same table, and there's also no room for slicers/checkboxes in my dashboard (it's also going to be printed so can't use the functionality).&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 22:22:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3523689#M135377</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-08T22:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: DAX command to show top 4/bottom 4 variances in a matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3524420#M135409</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure I am following you. All the values are already in the table with the calculated column. Never mind. If the correction of your formular below by ERD does not solve your problem, you might send an excel screenshot of what you final result should be.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 07:56:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-command-to-show-top-4-bottom-4-variances-in-a-matrix-table/m-p/3524420#M135409</guid>
      <dc:creator>scee07</dc:creator>
      <dc:date>2023-11-09T07:56:40Z</dc:date>
    </item>
  </channel>
</rss>

