<?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: calculate average of two columns and then score them by 1 or 0 if the average is &amp;gt;14 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341755#M125443</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure = &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;myAvg&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Column1]&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Column2]&lt;/SPAN&gt;&lt;SPAN&gt;)/&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;result&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;myAvg&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;14&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this post was helpful, please kudos or accept the answer as a solution.&lt;BR /&gt;~ Anthony Genovese&lt;BR /&gt;Need more PBI help? PM me for affordable, dedicated training or consultant recomendations!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2023 20:02:22 GMT</pubDate>
    <dc:creator>AnthonyGenovese</dc:creator>
    <dc:date>2023-07-20T20:02:22Z</dc:date>
    <item>
      <title>calculate average of two columns and then score them by 1 or 0 if the average is &gt;14</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341696#M125436</link>
      <description>&lt;P&gt;hello, i have two columns of data- I would like to sum two columns and take their average in each individual row(I thought this was AVERAGEX). . After the average for each row is calculated, I would like to create a measure that gives the row a score of 1 if the average is &amp;gt;14, otherwise a score of 0.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 19:09:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341696#M125436</guid>
      <dc:creator>finley0726</dc:creator>
      <dc:date>2023-07-20T19:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: calculate average of two columns and then score them by 1 or 0 if the average is &gt;14</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341700#M125437</link>
      <description>&lt;P&gt;It would be helpful if you created a table to show us the data you have, and how you want the results to look like. Also, do you want this as a calculated column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this post was helpful, please kudos or accept the answer as a solution.&lt;BR /&gt;~ Anthony Genovese&lt;BR /&gt;Need more PBI help? PM me for affordable, dedicated training or consultant recomendations!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 19:15:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341700#M125437</guid>
      <dc:creator>AnthonyGenovese</dc:creator>
      <dc:date>2023-07-20T19:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: calculate average of two columns and then score them by 1 or 0 if the average is &gt;14</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341709#M125438</link>
      <description>&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;code&lt;/TD&gt;&lt;TD&gt;column1&lt;/TD&gt;&lt;TD&gt;column2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the average of (column 1 + column 2) for each individual code. then,&amp;nbsp; if the average is &amp;gt;14, score is 1 otherwise 0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for the average, I used a measure:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure = averagex&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;[column1]&lt;/SPAN&gt;&lt;SPAN&gt; +&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;[column2]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;When I try to visualize the data in a matrix with Code in 'Rows' and my measure in "values' it shows the same value no matter the code. I took a PBI online course and I vaguely remember that this is a common issue but I cannot remember for the life of me how to fix it. Sorry, fairly new to this.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Jul 2023 19:24:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341709#M125438</guid>
      <dc:creator>finley0726</dc:creator>
      <dc:date>2023-07-20T19:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: calculate average of two columns and then score them by 1 or 0 if the average is &gt;14</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341743#M125442</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="592154" data-lia-user-login="finley0726" class="lia-mention lia-mention-user"&gt;finley0726&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;ScoreMeasure =&lt;BR /&gt;SUMX ( 'table', INT ( ( 'table'[column1] + 'table'[column2] ) / 2 &amp;gt; 14 ) )&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 19:54:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341743#M125442</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-07-20T19:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: calculate average of two columns and then score them by 1 or 0 if the average is &gt;14</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341755#M125443</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure = &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;myAvg&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Column1]&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Column2]&lt;/SPAN&gt;&lt;SPAN&gt;)/&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;result&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;myAvg&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;14&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this post was helpful, please kudos or accept the answer as a solution.&lt;BR /&gt;~ Anthony Genovese&lt;BR /&gt;Need more PBI help? PM me for affordable, dedicated training or consultant recomendations!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 20:02:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-average-of-two-columns-and-then-score-them-by-1-or-0/m-p/3341755#M125443</guid>
      <dc:creator>AnthonyGenovese</dc:creator>
      <dc:date>2023-07-20T20:02:22Z</dc:date>
    </item>
  </channel>
</rss>

