<?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 If Function not evaluating the expression correctly in Matrix /Table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Function-not-evaluating-the-expression-correctly-in-Matrix/m-p/2568585#M73262</link>
    <description>&lt;P&gt;I am trying to compare the values of a table(B) with a lookup Value( From Table A)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using FileDate to pick the value AV from Table A using measure,AV_A.&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;AV_A = &lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;var dt = SELECTEDVALUE('B'[FileDate])&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;var av_m = CALCULATE(sum('A'[AV]), FILTER(('A'), 'A'[FileDate] = dt))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;return&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#993300"&gt;av_m&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;and then using output of AV_A to compare with measure AB_B with the help of measure Test&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;AV_B = (SUM('B'[AV]))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;Test&lt;/FONT&gt;&lt;FONT size="2" color="#993300"&gt; =&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="2" color="#993300"&gt;IF([AV_A] = [AV_B],TRUE(),FALSE())&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Looks pretty simple and easy. But I am perplexed by the result it produced in Matrix or table visualization. I am attached the screenshot by Highlighting the anamoly.&lt;/DIV&gt;&lt;DIV&gt;I also dont want to show the values at subrow level ('distinct') and Total but want to show True/False for the Top row level ('Field') in matrix.&lt;/DIV&gt;&lt;DIV&gt;Any insight by the community members will be highly appreciated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&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;&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>Thu, 09 Jun 2022 08:58:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-09T08:58:59Z</dc:date>
    <item>
      <title>If Function not evaluating the expression correctly in Matrix /Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Function-not-evaluating-the-expression-correctly-in-Matrix/m-p/2568585#M73262</link>
      <description>&lt;P&gt;I am trying to compare the values of a table(B) with a lookup Value( From Table A)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using FileDate to pick the value AV from Table A using measure,AV_A.&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;AV_A = &lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;var dt = SELECTEDVALUE('B'[FileDate])&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;var av_m = CALCULATE(sum('A'[AV]), FILTER(('A'), 'A'[FileDate] = dt))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;return&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#993300"&gt;av_m&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;and then using output of AV_A to compare with measure AB_B with the help of measure Test&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;AV_B = (SUM('B'[AV]))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT face="helvetica"&gt;&lt;FONT color="#993300"&gt;Test&lt;/FONT&gt;&lt;FONT size="2" color="#993300"&gt; =&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="2" color="#993300"&gt;IF([AV_A] = [AV_B],TRUE(),FALSE())&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Looks pretty simple and easy. But I am perplexed by the result it produced in Matrix or table visualization. I am attached the screenshot by Highlighting the anamoly.&lt;/DIV&gt;&lt;DIV&gt;I also dont want to show the values at subrow level ('distinct') and Total but want to show True/False for the Top row level ('Field') in matrix.&lt;/DIV&gt;&lt;DIV&gt;Any insight by the community members will be highly appreciated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&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;&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>Thu, 09 Jun 2022 08:58:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Function-not-evaluating-the-expression-correctly-in-Matrix/m-p/2568585#M73262</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-09T08:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: If Function not evaluating the expression correctly in Matrix /Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Function-not-evaluating-the-expression-correctly-in-Matrix/m-p/2574169#M73638</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;Could you please provide some sample data in table A &amp;amp; B? And the expected outcome according to it? Thanks.&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;I also dont want to show the values at subrow level ('distinct') and Total but want to show True/False for the Top row level ('Field') in matrix.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Is the outcome below you want to get?&lt;/P&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;
&lt;P style="background: white;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;"&gt;&lt;SPAN&gt;Community Support Team _Tang&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 07:18:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Function-not-evaluating-the-expression-correctly-in-Matrix/m-p/2574169#M73638</guid>
      <dc:creator>v-xiaotang</dc:creator>
      <dc:date>2022-06-13T07:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: If Function not evaluating the expression correctly in Matrix /Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Function-not-evaluating-the-expression-correctly-in-Matrix/m-p/2574306#M73644</link>
      <description>&lt;P&gt;Hello Team_Tang,&lt;/P&gt;&lt;P&gt;Yes I want to get the outcome as you mentioned in screenshot and no Grand Total in matrix.&lt;/P&gt;&lt;P&gt;I am includng the&amp;nbsp;screenshot of all values of Table A and some values of table B.&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>Mon, 13 Jun 2022 07:56:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Function-not-evaluating-the-expression-correctly-in-Matrix/m-p/2574306#M73644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-13T07:56:12Z</dc:date>
    </item>
  </channel>
</rss>

