<?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: Understanding DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DAX/m-p/3788444#M148020</link>
    <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="710923" data-lia-user-login="BHAVIKCHAWLA" class="lia-mention lia-mention-user"&gt;BHAVIKCHAWLA&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&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; for sharing, I have an addition here:&lt;/P&gt;
&lt;P&gt;Allexcept() function: &lt;BR /&gt;1. Removes all context filters in the table except filters that have been applied to the specified columns.&lt;/P&gt;
&lt;P&gt;2. Functions for grouping&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are other function recommendations you might consider using the all() and allselected() functions:&lt;/P&gt;
&lt;P&gt;All():&lt;/P&gt;
&lt;P&gt;Returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/all-function-dax" target="_blank"&gt;ALL function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Allselected():&lt;/P&gt;
&lt;P&gt;Removes context filters from columns and rows in the current query, while retaining all other context filters or explicit filters.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/allselected-function-dax" target="_blank"&gt;ALLSELECTED function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to find the maximum value of each grouping after removing all filters, you can try the following dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
MAXX(FILTER(ALL('Table'),'Table'[column]=MAX('Table'[column])),[Value])&lt;/LI-CODE&gt;
&lt;P&gt;If you want to find the maximum value of each grouping as Visual changes, you can try the following dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Group_Allselect =
MAXX(FILTER(ALLSELECTED('Table'),'Table'[column]=MAX('Table'[column])),[Value])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;If you want to find the maximum value for the whole table after removing all filters, you can try the following dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Max_All =
MAXX(ALL('Table'),'Table'[Value])&lt;/LI-CODE&gt;
&lt;P&gt;If you want to find the maximum value for the whole table as Visual changes, you can try the following dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Max_Allselected =
MAXX(ALLSELECTED('Table'),'Table'[Value])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the data from the original table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;This is the result of measure:&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;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2024 02:37:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-03-25T02:37:39Z</dc:date>
    <item>
      <title>Understanding DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DAX/m-p/3787543#M147962</link>
      <description>&lt;P&gt;I am little new to Power BI and am finding little difficulty in understanding some concepts.&lt;BR /&gt;I was working - Highlighting max bars.&lt;BR /&gt;I am applied this logic -&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Maximum Value =&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;Var&lt;/SPAN&gt; &lt;SPAN&gt;MaxVal&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;MAXX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(table,sum(column&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; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;Color&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(sum(column)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;= &lt;/SPAN&gt;&lt;SPAN&gt;MaxVal&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Dark Blue"&lt;/SPAN&gt;&lt;SPAN&gt; , &lt;/SPAN&gt;&lt;SPAN&gt;"Grey"&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; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt; &lt;SPAN&gt;&lt;SPAN&gt;Color&lt;BR /&gt;This gave me incorrect - actually all were dark blue.&lt;BR /&gt;Whereas if I create another measure total = sum(column) and replace like below&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;Maximum Value =&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;Var&lt;/SPAN&gt; &lt;SPAN&gt;MaxVal&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;MAXX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(table,total&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; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;Color&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(total&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;MaxVal&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Dark Blue"&lt;/SPAN&gt;&lt;SPAN&gt; , &lt;/SPAN&gt;&lt;SPAN&gt;"Grey"&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; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt; &lt;SPAN&gt;Color&lt;BR /&gt;This gave me correct.&lt;BR /&gt;Can someone please help me in understanding concept. If any video is there related to this concept, please share&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 23 Mar 2024 15:35:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DAX/m-p/3787543#M147962</guid>
      <dc:creator>BHAVIKCHAWLA</dc:creator>
      <dc:date>2024-03-23T15:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DAX/m-p/3787907#M147993</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your semantic model looks like, but please try something like below.&lt;/P&gt;
&lt;P&gt;I think it needs context transition in the measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Maximum Value =
VAR MaxVal =
    MAXX ( ALL ( 'table' ), CALCULATE ( SUM ( 'table'[column] ) ) ) //need context transition and CALCULATE function enables context transition
VAR Color =
    IF ( SUM ( 'table'[column] ) = MaxVal, "Dark Blue", "Grey" )
RETURN
    Color
&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 24 Mar 2024 07:24:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DAX/m-p/3787907#M147993</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-03-24T07:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DAX/m-p/3788444#M148020</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="710923" data-lia-user-login="BHAVIKCHAWLA" class="lia-mention lia-mention-user"&gt;BHAVIKCHAWLA&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&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; for sharing, I have an addition here:&lt;/P&gt;
&lt;P&gt;Allexcept() function: &lt;BR /&gt;1. Removes all context filters in the table except filters that have been applied to the specified columns.&lt;/P&gt;
&lt;P&gt;2. Functions for grouping&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are other function recommendations you might consider using the all() and allselected() functions:&lt;/P&gt;
&lt;P&gt;All():&lt;/P&gt;
&lt;P&gt;Returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/all-function-dax" target="_blank"&gt;ALL function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Allselected():&lt;/P&gt;
&lt;P&gt;Removes context filters from columns and rows in the current query, while retaining all other context filters or explicit filters.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/allselected-function-dax" target="_blank"&gt;ALLSELECTED function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to find the maximum value of each grouping after removing all filters, you can try the following dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
MAXX(FILTER(ALL('Table'),'Table'[column]=MAX('Table'[column])),[Value])&lt;/LI-CODE&gt;
&lt;P&gt;If you want to find the maximum value of each grouping as Visual changes, you can try the following dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Group_Allselect =
MAXX(FILTER(ALLSELECTED('Table'),'Table'[column]=MAX('Table'[column])),[Value])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;If you want to find the maximum value for the whole table after removing all filters, you can try the following dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Max_All =
MAXX(ALL('Table'),'Table'[Value])&lt;/LI-CODE&gt;
&lt;P&gt;If you want to find the maximum value for the whole table as Visual changes, you can try the following dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Max_Allselected =
MAXX(ALLSELECTED('Table'),'Table'[Value])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the data from the original table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;This is the result of measure:&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;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 02:37:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-DAX/m-p/3788444#M148020</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-25T02:37:39Z</dc:date>
    </item>
  </channel>
</rss>

