<?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: get minimum of selected slicer column values, in a table showing the selected column. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-minimum-of-selected-slicer-column-values-in-a-table-showing/m-p/3481198#M133090</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Not sure to understand exactly, but my guess would be to add an ALL( YearMonth ) in your MAX, to check max without the filters (rows) of your visuals.&lt;/P&gt;&lt;P&gt;Something like :&lt;/P&gt;&lt;PRE&gt;CALCULATE ( MAX(YearMonth) , ALL(YearMonth) )&lt;/PRE&gt;&lt;P&gt;but it might be useless...&lt;BR /&gt;since your cumulative total could be achieved with :&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;RunningTotal=&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CurrentYM&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;YourTable&lt;/SPAN&gt;&lt;SPAN&gt;[YearMonth]&lt;/SPAN&gt;&lt;SPAN&gt; )//Get the value on the current line&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE&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;YourTable&lt;/SPAN&gt;&lt;SPAN&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN&gt;),    //You can replace by your measure&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;YourTable&lt;/SPAN&gt;&lt;SPAN&gt;[YearMonth]&lt;/SPAN&gt;&lt;SPAN&gt; ),         //Unfilter the YearMonth from visual&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;YourTable&lt;/SPAN&gt;&lt;SPAN&gt;[YearMonth]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;CurrentYM     //Add only the value previous to the current one&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;SPAN&gt;Hope it helps, if not let us know what's wrong&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 17 Oct 2023 13:45:47 GMT</pubDate>
    <dc:creator>AilleryO</dc:creator>
    <dc:date>2023-10-17T13:45:47Z</dc:date>
    <item>
      <title>get minimum of selected slicer column values, in a table showing the selected column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-minimum-of-selected-slicer-column-values-in-a-table-showing/m-p/3480930#M133063</link>
      <description>&lt;P&gt;slicer: yearmonth&lt;/P&gt;&lt;P&gt;selected: 2023-09 and 2023-10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;table&lt;/P&gt;&lt;P&gt;yearmonth&amp;nbsp; &amp;nbsp;| salesvalue&lt;/P&gt;&lt;P&gt;2023-09 | 1234&lt;/P&gt;&lt;P&gt;2023-10 | 4321&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I want to add is the accumulated sales in the selected period.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;table&lt;/P&gt;&lt;P&gt;yearmonth&amp;nbsp; &amp;nbsp;| accum.sales&lt;/P&gt;&lt;P&gt;2023-09 | 1234&lt;/P&gt;&lt;P&gt;2023-10 | 5555&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for this I need the minimum and maximum of the selected slicer values, to get the filter in dax: yearmonth &amp;gt;= MinYearMonth, yearmonth &amp;lt;= MaxYearMonth.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to get the Min and MaxYearMonth? Because in the table itself the selectedvalue of yearmonth becomes the single value of the line in the table: either 2023-09 of 2023-10, not both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 11:05:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-minimum-of-selected-slicer-column-values-in-a-table-showing/m-p/3480930#M133063</guid>
      <dc:creator>Johan</dc:creator>
      <dc:date>2023-10-17T11:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: get minimum of selected slicer column values, in a table showing the selected column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-minimum-of-selected-slicer-column-values-in-a-table-showing/m-p/3481198#M133090</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Not sure to understand exactly, but my guess would be to add an ALL( YearMonth ) in your MAX, to check max without the filters (rows) of your visuals.&lt;/P&gt;&lt;P&gt;Something like :&lt;/P&gt;&lt;PRE&gt;CALCULATE ( MAX(YearMonth) , ALL(YearMonth) )&lt;/PRE&gt;&lt;P&gt;but it might be useless...&lt;BR /&gt;since your cumulative total could be achieved with :&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;RunningTotal=&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CurrentYM&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;YourTable&lt;/SPAN&gt;&lt;SPAN&gt;[YearMonth]&lt;/SPAN&gt;&lt;SPAN&gt; )//Get the value on the current line&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE&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;YourTable&lt;/SPAN&gt;&lt;SPAN&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN&gt;),    //You can replace by your measure&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;YourTable&lt;/SPAN&gt;&lt;SPAN&gt;[YearMonth]&lt;/SPAN&gt;&lt;SPAN&gt; ),         //Unfilter the YearMonth from visual&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;YourTable&lt;/SPAN&gt;&lt;SPAN&gt;[YearMonth]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;CurrentYM     //Add only the value previous to the current one&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;SPAN&gt;Hope it helps, if not let us know what's wrong&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Oct 2023 13:45:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-minimum-of-selected-slicer-column-values-in-a-table-showing/m-p/3481198#M133090</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2023-10-17T13:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: get minimum of selected slicer column values, in a table showing the selected column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-minimum-of-selected-slicer-column-values-in-a-table-showing/m-p/3484606#M133305</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6920" data-lia-user-login="Johan" class="lia-mention lia-mention-user"&gt;Johan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please try below steps:&lt;/P&gt;
&lt;P&gt;1. below is my test table&lt;/P&gt;
&lt;P&gt;Table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Table2:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = CALENDAR(FIRSTDATE('Table'[Year Month]),LASTDATE('Table'[Year Month]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. create measure with below dax formula&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _a =
    MIN ( 'Table 2'[Date] )
VAR _b =
    MAX ( 'Table 2'[Date] )
VAR tmp =
    CALENDAR ( _a, _b )
VAR cur_ym =
    SELECTEDVALUE ( 'Table'[Year Month] )
RETURN
    IF ( cur_ym IN tmp, 1 )
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure2 =
VAR cur_ym =
    SELECTEDVALUE ( 'Table'[Year Month] )
VAR tmp =
    FILTER ( ALL ( 'Table' ), [Year Month] &amp;lt;= cur_ym &amp;amp;&amp;amp; [Measure] = 1 )
RETURN
    SUMX ( tmp, [Sales] )
&lt;/LI-CODE&gt;
&lt;P&gt;3. add a slicer visual with Table 2 field , add a table visual with Table field and Measure2, add Measure to table visual filter pane and set&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Please refer the attached .pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team_Binbin Yu&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 04:23:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-minimum-of-selected-slicer-column-values-in-a-table-showing/m-p/3484606#M133305</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-19T04:23:54Z</dc:date>
    </item>
  </channel>
</rss>

