<?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: Countrows based on filtered measure type text in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-based-on-filtered-measure-type-text/m-p/2760393#M85532</link>
    <description>&lt;P&gt;Both replies helped. Thank you so much!&lt;/P&gt;</description>
    <pubDate>Sun, 11 Sep 2022 14:22:25 GMT</pubDate>
    <dc:creator>Kebas_Leech</dc:creator>
    <dc:date>2022-09-11T14:22:25Z</dc:date>
    <item>
      <title>Countrows based on filtered measure type text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-based-on-filtered-measure-type-text/m-p/2755731#M85184</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have been trying to solve this but i've been unsuccessful so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following measure [perf_shift] calculates and prints in which shift i have the max performance, based on another measure [performance]:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR vals =
SUMMARIZE(
    'Main_Table',
    'Main_Table' [Shifts],
    "Measure", [performance]
) 
VAR measureMax = MAXX( vals, [performance] ) 
VAR perf_shift = CALCULATE(
    MAXX(
        FILTER( vals, [Measure] = measureMax ),
        'Main_Table' [Shifts]
    )
) 

RETURN
perf_shift&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Returns: (filter: Production Line and Product Type)&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Production Line&lt;/TD&gt;&lt;TD&gt;Product Type&lt;/TD&gt;&lt;TD&gt;Perf_Shift&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;type x&lt;/TD&gt;&lt;TD&gt;1st&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;type y&lt;/TD&gt;&lt;TD&gt;1st&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;type z&lt;/TD&gt;&lt;TD&gt;1st&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;type y&lt;/TD&gt;&lt;TD&gt;2nd&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, what im trying to calculate is the total sum of 1st and 2nd shifts that I end up with based on the same filters.&lt;/P&gt;&lt;P&gt;Expected Result:&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;Shift&lt;/TD&gt;&lt;TD&gt;Count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1st&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2nd&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 13:46:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-based-on-filtered-measure-type-text/m-p/2755731#M85184</guid>
      <dc:creator>Kebas_Leech</dc:creator>
      <dc:date>2022-09-08T13:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Countrows based on filtered measure type text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-based-on-filtered-measure-type-text/m-p/2755775#M85186</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="377760" data-lia-user-login="Kebas_Leech" class="lia-mention lia-mention-user"&gt;Kebas_Leech&lt;/a&gt; , You need to do dynamic segmentation&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dynamic segmentation -Measure to Dimension conversion: &lt;A href="https://youtu.be/gzY40NWJpWQ" target="_blank" rel="noopener"&gt;https://youtu.be/gzY40NWJpWQ&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Above is for single value what you need&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;range value example&lt;/P&gt;
&lt;P&gt;Dynamic Segmentation Bucketing Binning&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 13:59:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-based-on-filtered-measure-type-text/m-p/2755775#M85186</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-09-08T13:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Countrows based on filtered measure type text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-based-on-filtered-measure-type-text/m-p/2755791#M85188</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="377760" data-lia-user-login="Kebas_Leech" class="lia-mention lia-mention-user"&gt;Kebas_Leech&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you need first to creat a disconnected table that contains { "1st", "2nd" } let's call it Shifts which you're going to use in the visual&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then use the following measure&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Count =
SUMX (
    SUMMARIZE ( 'Main_Table', 'Main_Table'[Production], 'Main_Table'[LineProduct] ),
    IF ( [Perf_Shift] = MAX ( Shifts[Shift] ), 1 )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 08 Sep 2022 14:06:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-based-on-filtered-measure-type-text/m-p/2755791#M85188</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-08T14:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Countrows based on filtered measure type text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-based-on-filtered-measure-type-text/m-p/2760393#M85532</link>
      <description>&lt;P&gt;Both replies helped. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2022 14:22:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-based-on-filtered-measure-type-text/m-p/2760393#M85532</guid>
      <dc:creator>Kebas_Leech</dc:creator>
      <dc:date>2022-09-11T14:22:25Z</dc:date>
    </item>
  </channel>
</rss>

