<?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: Disitinct count with condition across column in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/793530#M2554</link>
    <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Or you can create a new table, create a 1 ti 1 relationship between tables, and drop the measure on that table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Summary Table = SELECTCOLUMNS(OHMS,"Street",[Column1])&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ohms 1.PNG" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/192893iC5A44D0938A3F249/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ohms 1.PNG" alt="ohms 1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ohms 3.PNG" style="width: 327px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/192894iC8B1CD5E7F1DEA70/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ohms 3.PNG" alt="ohms 3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2019 16:45:20 GMT</pubDate>
    <dc:creator>Nathaniel_C</dc:creator>
    <dc:date>2019-09-16T16:45:20Z</dc:date>
    <item>
      <title>Disitinct count with condition across column</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/793257#M2543</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;Please how can i return the results below using a DAX formula?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Months&lt;/TD&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;Apr&lt;/TD&gt;&lt;TD&gt;May&lt;/TD&gt;&lt;TD&gt;Jun&lt;/TD&gt;&lt;TD&gt;Jul&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Street-Number&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NG-PHC-21&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;86&lt;/TD&gt;&lt;TD&gt;82&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;65&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NG-PHC-32&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;88&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;86&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NG-PHC-45&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;82&lt;/TD&gt;&lt;TD&gt;81&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;82&lt;/TD&gt;&lt;TD&gt;88&lt;/TD&gt;&lt;TD&gt;89&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Table 1 shows power surge recordings for streets each month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: street NG-PHC-21's power situation was critical in the past 3 months and counts as 1 in the results table for the month of March because it has consistently exceeded 80 ohms in its readings for each month(Jan, Feb and March)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Results table&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;Apr&lt;/TD&gt;&lt;TD&gt;May&lt;/TD&gt;&lt;TD&gt;Jun&lt;/TD&gt;&lt;TD&gt;Jul&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NG-PHC-21&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NG-PHC-32&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NG-PHC-45&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;EM&gt;Table 2 shows the way i want to represent this information.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So street NG-PHC-45, was &amp;gt;80 in Jan, &amp;gt; 80 in Feb, and &amp;gt; 80 in March and so counts as 1 in March in the results table.&lt;/P&gt;&lt;P&gt;again it was &amp;gt;80 for march, &amp;lt; 80 in Apr and &amp;gt;80 in May but this time does not count as 1 in May in the results table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 12:49:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/793257#M2543</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-16T12:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Disitinct count with condition across column</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/793480#M2553</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure whethear you wanted this as a visual table, but I dropped the street names on the table, and created this measure.&lt;/P&gt;&lt;PRE&gt;March = IF(max(OHMS[Jan])&amp;gt;=80 &amp;amp;&amp;amp; MAX(OHMS[Feb] ) &amp;gt;=80 &amp;amp;&amp;amp; MAX(OHMS[Mar]) &amp;gt;= 80, 1,0)&lt;/PRE&gt;&lt;P&gt;I would note that you say exceeds, but in your summary table you use &amp;gt;= to get the value.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ohms.PNG" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/192876i9FF86DC696DE9B72/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ohms.PNG" alt="ohms.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 15:56:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/793480#M2553</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-16T15:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Disitinct count with condition across column</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/793530#M2554</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Or you can create a new table, create a 1 ti 1 relationship between tables, and drop the measure on that table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Summary Table = SELECTCOLUMNS(OHMS,"Street",[Column1])&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ohms 1.PNG" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/192893iC5A44D0938A3F249/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ohms 1.PNG" alt="ohms 1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ohms 3.PNG" style="width: 327px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/192894iC8B1CD5E7F1DEA70/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ohms 3.PNG" alt="ohms 3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 16:45:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/793530#M2554</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-16T16:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Disitinct count with condition across column</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/795369#M2563</link>
      <description>&lt;P&gt;Hello, @Anonymous&lt;/a&gt; thanks for your help. Ive tried this but it doesnt work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ive also tried to get the expected power readings&amp;nbsp; for each month by creating 3 calculated measures and doing an if statements that looks at the values returned by the calculated measures and returning a 1 for each month where the multiple criterias match and 0 otherwise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Months&lt;/TD&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;Apr&lt;/TD&gt;&lt;TD&gt;May&lt;/TD&gt;&lt;TD&gt;Jun&lt;/TD&gt;&lt;TD&gt;Jul&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Street-Number&lt;/TD&gt;&lt;TD&gt;Power Rd&lt;/TD&gt;&lt;TD&gt;Power Rd&lt;/TD&gt;&lt;TD&gt;Power Rd&lt;/TD&gt;&lt;TD&gt;Power Rd&lt;/TD&gt;&lt;TD&gt;Power Rd&lt;/TD&gt;&lt;TD&gt;Power Rd&lt;/TD&gt;&lt;TD&gt;Power Rd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NG-PHC-21&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;86&lt;/TD&gt;&lt;TD&gt;82&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;65&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NG-PHC-32&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;88&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;86&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NG-PHC-45&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;82&lt;/TD&gt;&lt;TD&gt;81&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;82&lt;/TD&gt;&lt;TD&gt;88&lt;/TD&gt;&lt;TD&gt;89&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power_over_80 = CALCULATE(COUNT(Table1[Street Number], FILTER(Table1,[Power Rd] &amp;gt;= 80&lt;/P&gt;&lt;P&gt;(This measure returns a "1" for each street each month whose power readings is &amp;gt;or = 80 and&amp;nbsp; "blank" if otherwise&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;following this I created the 3 measures below&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current_month = CALCULATE(COUNT(Table1[Street Number]), FILTER(Table1,[Power Rd]) &amp;gt;= 80 &amp;amp;&amp;amp; Table1[Month] = MONTH(TODAY())))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Prev_month = var current_month = MONTH(TODAY()) return CALCULATE(COUNT(Table1[Street Number]), FILTER(Table1,[Power Rd] &amp;gt;= 80 &amp;amp;&amp;amp; Table1[Month] = current_month - 1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Prev_2month = var current_month = MONTH(TODAY()) return CALCULATE(COUNT(Table1[Street Number]), FILTER(Table1,[Power Rd] &amp;gt;= 80 &amp;amp;&amp;amp; Table1[Month] = current_month - 2))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then ran an if statement against the 3 measures&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Count_last2_months = IF(Table1[Current_month] = 1 &amp;amp;&amp;amp; Table1[Prev_month] = 1 &amp;amp;&amp;amp; Table1[Prev_2month] = 1, 1,0)&lt;/P&gt;&lt;P&gt;This is the measure i expect should look at the returned value for each month and if it is a "1" for three months in a row it returns "1" on the third month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i'm still not getting the result i want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Somebody help me!!!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 07:15:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/795369#M2563</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-18T07:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Disitinct count with condition across column</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/796217#M2566</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;What do you mean it does not work?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 20:06:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/796217#M2566</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-18T20:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Disitinct count with condition across column</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/797083#M2580</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/159166"&gt;@Nathaniel_C&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;What do you mean it does not work?&lt;/P&gt;&lt;P&gt;@nathaniel i mean it doesnt work the way i want it.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 13:46:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Disitinct-count-with-condition-across-column/m-p/797083#M2580</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-19T13:46:01Z</dc:date>
    </item>
  </channel>
</rss>

