<?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: How to Find Percentage Based on Another Field Containing a Specific String? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3440317#M130659</link>
    <description>&lt;P&gt;Apologies I think my first post was a bit confusing... here is an example of data for it.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And my desired output is a percentage based on the count of total rows in the batch column that has a note containing "Error" allowing you to sort by method as it is attached to the batch column which is always unique unlike notes.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2023 16:21:36 GMT</pubDate>
    <dc:creator>Asuna</dc:creator>
    <dc:date>2023-09-20T16:21:36Z</dc:date>
    <item>
      <title>How to Find Percentage Based on Another Field Containing a Specific String?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3438266#M130497</link>
      <description>&lt;P&gt;Hello, I was looking for some help as I am quite new to DAX, I was wondering if it is possible to make a column that counts the total number of rows in Batch ID then count the number of instances in the notes column that contains a speific string? I am trying to make a percentage of Batch ID that contains a keyword in the notes. I only want to accomplish this because the batch id is unique and the notes are often duplicated and I need to be able to identify the percentages by method so just counting the notes will not work.&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;</description>
      <pubDate>Tue, 19 Sep 2023 13:03:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3438266#M130497</guid>
      <dc:creator>Asuna</dc:creator>
      <dc:date>2023-09-19T13:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to Find Percentage Based on Another Field Containing a Specific String?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3438481#M130516</link>
      <description>&lt;P&gt;Hi. Please, provide some demo data and show the desired output.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Get-Your-Question-Answered-Quickly/td-p/1626726/jump-to/first-unread-message" target="_blank"&gt;https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Get-Your-Question-Answered-Quickly/td-p/1626726/jump-to/first-unread-message&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 15:16:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3438481#M130516</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-09-19T15:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to Find Percentage Based on Another Field Containing a Specific String?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3440133#M130646</link>
      <description>&lt;P&gt;Oops, sorry here is some example data:&amp;nbsp;&lt;BR /&gt;Batch&amp;nbsp; &amp;nbsp; Method&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Notes (String)&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Method1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Correct 07 Jul 2023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Method1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Correct 11 Aug 2023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Method2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Correct 11 Aug 2023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Method1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Correct 19 Sep 2023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Method1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Error 19 Sep 2023&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;My desired output would be the ability to identify the rate at which the notes string contains the phrase error.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Method1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;20% Error&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Method2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;0% Error&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 20 Sep 2023 14:29:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3440133#M130646</guid>
      <dc:creator>Asuna</dc:creator>
      <dc:date>2023-09-20T14:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to Find Percentage Based on Another Field Containing a Specific String?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3440199#M130652</link>
      <description>&lt;P&gt;You need to do something like this. If this doesn't work, provide more context of your dataset. Happy to help.&lt;BR /&gt;Percentage =&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; _CountRows =&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt; &lt;SPAN&gt;(&lt;/SPAN&gt; &lt;SPAN&gt;'Table'&lt;/SPAN&gt; &lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt; &lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_CountRows,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt; &lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;COUNT&lt;/SPAN&gt; &lt;SPAN&gt;(&lt;/SPAN&gt; &lt;SPAN&gt;'Table'[Method]&lt;/SPAN&gt; &lt;SPAN&gt;)&lt;/SPAN&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;ALL&lt;/SPAN&gt; &lt;SPAN&gt;(&lt;/SPAN&gt; &lt;SPAN&gt;'Table'&lt;/SPAN&gt; &lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 15:01:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3440199#M130652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-20T15:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Find Percentage Based on Another Field Containing a Specific String?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3440317#M130659</link>
      <description>&lt;P&gt;Apologies I think my first post was a bit confusing... here is an example of data for it.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And my desired output is a percentage based on the count of total rows in the batch column that has a note containing "Error" allowing you to sort by method as it is attached to the batch column which is always unique unlike notes.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 16:21:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3440317#M130659</guid>
      <dc:creator>Asuna</dc:creator>
      <dc:date>2023-09-20T16:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Find Percentage Based on Another Field Containing a Specific String?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3440356#M130660</link>
      <description>&lt;P&gt;So as far as I understand,&amp;nbsp;&lt;SPAN&gt;Batch column contains unique values and you need pct per Method.&amp;nbsp;&lt;/SPAN&gt;Here is the measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;pct =
VAR method = SELECTEDVALUE ( Table_[Method] )
VAR errorRows =
    CALCULATE (
        COUNT ( Table_[Batch] ),
        CONTAINSSTRING ( Table_[Notes], "Error" ),
        Table_[Method] = method
    )
VAR allRows = CALCULATE ( COUNT ( Table_[Batch] ), Table_[Method] = method )
RETURN
    DIVIDE ( errorRows, allRows, 0 )&lt;/LI-CODE&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;</description>
      <pubDate>Wed, 20 Sep 2023 16:55:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Find-Percentage-Based-on-Another-Field-Containing-a/m-p/3440356#M130660</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-09-20T16:55:44Z</dc:date>
    </item>
  </channel>
</rss>

