<?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: Dax not returning a value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-not-returning-a-value/m-p/2509746#M69583</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="112373" data-lia-user-login="David01" class="lia-mention lia-mention-user"&gt;David01&lt;/a&gt; , can share some visual screen shot. the above should work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this too&lt;/P&gt;
&lt;P&gt;CALCULATE(SUM(Manufacturing[TonnesMade]),Filter(Machine,&amp;nbsp; Machine[Alt Name] IN {"MA","MB","MC","MD"}) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
    <pubDate>Thu, 12 May 2022 07:35:07 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-05-12T07:35:07Z</dc:date>
    <item>
      <title>Dax not returning a value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-not-returning-a-value/m-p/2508758#M69545</link>
      <description>&lt;P&gt;I am having difficulty getting the following to work any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF( MAX(Machine[Display])="Precision"&lt;BR /&gt;,CALCULATE(SUM(Manufacturing[TonnesMade]),Machine[Alt Name] IN {"MA","MB","MC","MD"})&lt;BR /&gt;,CALCULATE( SUM(Manufacturing[TonnesMade])))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TRIED&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR = CALCULATE(SUM(Manufacturing[TonnesMade]),Machine[Alt Name] IN {"MA","MB","MC","MD"})&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;IF( MAX(Machine[Display])="Precision"&lt;BR /&gt;,VAR&lt;BR /&gt;,CALCULATE( SUM(Manufacturing[TonnesMade])))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If I do the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF( MAX(Machine[Display])="Precision"&lt;BR /&gt;,12345.01&lt;BR /&gt;,CALCULATE( SUM(Manufacturing[TonnesMade])))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It returns the 12345.01 for Precision otherwise it wont even show Precision.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;All other results are shown as expected for any of the variations I have tried.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The CALCULATE(SUM(Manufacturing[TonnesMade]),Machine[Alt Name] IN {"MA","MB","MC","MD"}) does return a value if i use it in a card as a test&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the table Manufacturing and Machine have a relationship one to many.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 21:53:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-not-returning-a-value/m-p/2508758#M69545</guid>
      <dc:creator>David01</dc:creator>
      <dc:date>2022-05-11T21:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dax not returning a value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-not-returning-a-value/m-p/2509746#M69583</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="112373" data-lia-user-login="David01" class="lia-mention lia-mention-user"&gt;David01&lt;/a&gt; , can share some visual screen shot. the above should work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this too&lt;/P&gt;
&lt;P&gt;CALCULATE(SUM(Manufacturing[TonnesMade]),Filter(Machine,&amp;nbsp; Machine[Alt Name] IN {"MA","MB","MC","MD"}) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 07:35:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-not-returning-a-value/m-p/2509746#M69583</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-05-12T07:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dax not returning a value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-not-returning-a-value/m-p/2511876#M69694</link>
      <description>&lt;P&gt;I changed this&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;IF( MAX(Machine[Display])="Precision"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;,CALCULATE(SUM(Manufacturing[TonnesMade]),Machine[Alt Name] IN {"MA","MB","MC","MD"})&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;,CALCULATE( SUM(Manufacturing[TonnesMade])))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;To&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IF( MAX(Machine[Display])="Precision"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;,CALCULATE(SUM(Manufacturing[TonnesMade]),Machine[Alt Name] IN {"MA","MB","MC","MD"},&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;allexcept&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Machine&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Machine[Alt Name]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;,CALCULATE( SUM(Manufacturing[TonnesMade])))&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;It now works as I required.&lt;/P&gt;&lt;P&gt;I will be the first to &lt;SPAN&gt;acknowledge&amp;nbsp;&lt;/SPAN&gt;I have no idea what the allexcept is acually doing.&lt;BR /&gt;&lt;BR /&gt;Thanks for looking at this for me.&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 02:00:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-not-returning-a-value/m-p/2511876#M69694</guid>
      <dc:creator>David01</dc:creator>
      <dc:date>2022-05-13T02:00:58Z</dc:date>
    </item>
  </channel>
</rss>

