<?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: Creating a measure based on rows that meet a certain criteria in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1067977#M14947</link>
    <description>&lt;P&gt;I think this is what you are looking for, but please let me know if not.&amp;nbsp; I put your data in a table called 'Data'.&amp;nbsp; This measure summarizes contracts and proposals for each customer/month in the current context and then iterates through them all to give you an overall percentage of contracts/proposals.&amp;nbsp; It would work in a table visual with Customer and Month columns, or it would work in a card or other visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Pct Contracts = var summarytable = ADDCOLUMNS(SUMMARIZE(Data, Data[Customer], Data[Month]), "Proposals", CALCULATE(SUM(Data[Value]), Data[Metric Type]="proposals"), "Contracts", CALCULATE(SUM(Data[Value]), Data[Metric Type]="Contracts"))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var result = SUMX(summarytable, [Contracts]/[Proposals])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Also, I would suggest, if your two tables are highly similar ,that you append them into one table with an extra column to show open/closed status.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If this works for you, please mark it as the solution.&amp;nbsp; Kudos are also appreciated.&amp;nbsp; Please let me know if not.&lt;BR /&gt;Regards,&lt;BR /&gt;Pat&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 04 May 2020 22:38:27 GMT</pubDate>
    <dc:creator>mahoneypat</dc:creator>
    <dc:date>2020-05-04T22:38:27Z</dc:date>
    <item>
      <title>Creating a measure based on rows that meet a certain criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1067948#M14946</link>
      <description>&lt;P&gt;Hi all - I'm looking for a specific layout for my Matrix, like the below&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; January&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;February&lt;/P&gt;&lt;P&gt;&amp;nbsp; Contracts&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; Proposals&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Contracts&amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Proposals&lt;/P&gt;&lt;P&gt;open | closed&amp;nbsp; |&amp;nbsp; &amp;nbsp;open&amp;nbsp; |&amp;nbsp; closed&amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp;open&amp;nbsp; &amp;nbsp;closed&amp;nbsp; |&amp;nbsp; &amp;nbsp; open&amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp;closed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My tables look like such - it holds either all open or all closed, currently I have 2 of them.&lt;/P&gt;&lt;P&gt;Columns: customer, month, metric type, value&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abc123&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;contracts&amp;nbsp; &amp;nbsp; &amp;nbsp;12&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; joes&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proposals&amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;abc123&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proposals&amp;nbsp; &amp;nbsp; &amp;nbsp;24&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;joes&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contracts&amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to do is create Measure that takes (for each customer, month, and metric type) the contracts and divides them by the proposals to give me a percent of proposals that make it to contracts. The logic is similar to what I'm actually doing - just simplified. I have done Measure on whole columns before but never row based on certain criteria. Can this even be done?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 21:59:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1067948#M14946</guid>
      <dc:creator>dhummel</dc:creator>
      <dc:date>2020-05-04T21:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a measure based on rows that meet a certain criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1067977#M14947</link>
      <description>&lt;P&gt;I think this is what you are looking for, but please let me know if not.&amp;nbsp; I put your data in a table called 'Data'.&amp;nbsp; This measure summarizes contracts and proposals for each customer/month in the current context and then iterates through them all to give you an overall percentage of contracts/proposals.&amp;nbsp; It would work in a table visual with Customer and Month columns, or it would work in a card or other visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Pct Contracts = var summarytable = ADDCOLUMNS(SUMMARIZE(Data, Data[Customer], Data[Month]), "Proposals", CALCULATE(SUM(Data[Value]), Data[Metric Type]="proposals"), "Contracts", CALCULATE(SUM(Data[Value]), Data[Metric Type]="Contracts"))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var result = SUMX(summarytable, [Contracts]/[Proposals])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Also, I would suggest, if your two tables are highly similar ,that you append them into one table with an extra column to show open/closed status.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If this works for you, please mark it as the solution.&amp;nbsp; Kudos are also appreciated.&amp;nbsp; Please let me know if not.&lt;BR /&gt;Regards,&lt;BR /&gt;Pat&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 May 2020 22:38:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1067977#M14947</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-05-04T22:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a measure based on rows that meet a certain criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1067980#M14948</link>
      <description>&lt;P&gt;Hi Pat. I actually am not looking for 1 overall percentage. I need 1 percentage rate for each customer per month. Then this percentage rate can be graphed visually, or, as I intend to do.... add it to my matrix as another column next to open and closed.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 22:42:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1067980#M14948</guid>
      <dc:creator>dhummel</dc:creator>
      <dc:date>2020-05-04T22:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a measure based on rows that meet a certain criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1067996#M14951</link>
      <description>&lt;P&gt;Yes.&amp;nbsp; This measure will work in a table too (or a line chart). I assume you would make a table with Customer and Month like in your original post, but I wrote it so it could be used other ways too.&amp;nbsp; Have you tried it in a table?&amp;nbsp; I tried it with your sample data, and it seems to be what you were describing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Is that what you were looking for?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 23:03:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1067996#M14951</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-05-04T23:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a measure based on rows that meet a certain criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1072830#M14998</link>
      <description>&lt;P&gt;I am receiving NANs, no numbers at all. Is there a way to see the summarytable var?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 12:53:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1072830#M14998</guid>
      <dc:creator>dhummel</dc:creator>
      <dc:date>2020-05-05T12:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a measure based on rows that meet a certain criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1072872#M15001</link>
      <description>&lt;P&gt;Ok so it seems like this is working in a table, but not a matrix - is there a reason why?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 13:06:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-based-on-rows-that-meet-a-certain-criteria/m-p/1072872#M15001</guid>
      <dc:creator>dhummel</dc:creator>
      <dc:date>2020-05-05T13:06:43Z</dc:date>
    </item>
  </channel>
</rss>

