<?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: Help on DAX forumla in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3338656#M125259</link>
    <description>&lt;P&gt;Hello and thanks for reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to divide the forumla and also use your proposal but have error.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If i use&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PMP2 = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Machine Minutes]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;DimMachineStatus&lt;/SPAN&gt;&lt;SPAN&gt;[MachineStatusId]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;16&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Retourn this error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For more info:&lt;BR /&gt;&lt;BR /&gt;Machine Minutes is the name of column in table "Measure" and is a number value&lt;/P&gt;&lt;P&gt;MachineStatusId is a text type of table DimMachineStatus&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I need calculate this:&lt;BR /&gt;&lt;BR /&gt;Need to extract from colum "Machine Minutes" the value of filtre 16 on MachineStatusID (VALUE 1)&lt;BR /&gt;Then divide VALUE 1 with the sum of value MachineStatusID 16, 3,4&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jul 2023 13:07:56 GMT</pubDate>
    <dc:creator>lifesafari</dc:creator>
    <dc:date>2023-07-19T13:07:56Z</dc:date>
    <item>
      <title>Help on DAX forumla</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3331301#M124839</link>
      <description>&lt;P&gt;Hello i need a create a DAX to use in a card but i have this error&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;With the forumula i need to calculate the KPI PMP and i've create a new measure as is:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PMP1 = &lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Machine Minutes]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;DimMachineStatus&lt;/SPAN&gt;&lt;SPAN&gt;[MachineStatusId]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;16&lt;/SPAN&gt;&lt;SPAN&gt;), &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Machine Minutes]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;DimMachineStatus&lt;/SPAN&gt;&lt;SPAN&gt;[MachineStatusId]&lt;/SPAN&gt; &lt;SPAN&gt;IN&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;16&lt;/SPAN&gt;&lt;SPAN&gt;}) &amp;nbsp;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Where wrong? Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 13:04:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3331301#M124839</guid>
      <dc:creator>lifesafari</dc:creator>
      <dc:date>2023-07-14T13:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help on DAX forumla</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3331315#M124841</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="589214" data-lia-user-login="lifesafari" class="lia-mention lia-mention-user"&gt;lifesafari&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To troubleshoot,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Try separating each CALCULATE into its own separate measure to isolate where the error is.&lt;/P&gt;&lt;P&gt;2) If the error still occurs in each separate measure, remove the DimMachineStatus condition line to see if it still throws the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you able to 100% verify the data type of &lt;STRONG&gt;DimMachineStatus[MachineStatusId]&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;If it happens to be data type TEXT, that would cause it since your measure is evaluating INTEGERS.&amp;nbsp; (16 &amp;amp; {3,4,16})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 13:19:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3331315#M124841</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2023-07-14T13:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help on DAX forumla</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3331418#M124845</link>
      <description>&lt;P&gt;&lt;SPAN&gt;PMP1 =&amp;nbsp;&lt;BR /&gt;VAR&amp;nbsp;&amp;nbsp;var1 = CALCULATE([Machine Minutes],&amp;nbsp;DimMachineStatus[MachineStatusId]&amp;nbsp;=&amp;nbsp;16)&lt;BR /&gt;VAR var2 =&amp;nbsp;CALCULATE([Machine Minutes],&amp;nbsp;DimMachineStatus[MachineStatusId]&amp;nbsp;IN&amp;nbsp;{3,4,16})&lt;BR /&gt;&lt;/SPAN&gt;VAR var3 = DIVIDE(var1, var2)&lt;BR /&gt;RETURN&lt;BR /&gt;var3 //but as you have an error check var1 and var1 return without errors.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 14:18:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3331418#M124845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-14T14:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help on DAX forumla</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3331453#M124852</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hello and thanks for reply. Yes&amp;nbsp;&lt;/FONT&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT&gt;DimMachineStatus[MachineStatusId]&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT&gt;is a TEXT type...&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 14:41:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3331453#M124852</guid>
      <dc:creator>lifesafari</dc:creator>
      <dc:date>2023-07-14T14:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help on DAX forumla</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3331673#M124865</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="589214" data-lia-user-login="lifesafari" class="lia-mention lia-mention-user"&gt;lifesafari&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OK, then yes.&amp;nbsp; That's the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a column contains text, then DAX cannot compare it to an integer.&lt;/P&gt;&lt;P&gt;You must compare text to text or integers with integers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should be able to resolve this by changing the integers to strings within your measure, as follows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PMP1 =&lt;BR /&gt;DIVIDE(&lt;BR /&gt;CALCULATE(&lt;BR /&gt;&amp;nbsp; &amp;nbsp;[Machine Minutes],&lt;BR /&gt;&amp;nbsp; &amp;nbsp;DimMachineStatus[MachineStatusId] = "16"&lt;BR /&gt;),&lt;BR /&gt;CALCULATE(&lt;BR /&gt;&amp;nbsp; &amp;nbsp;[Machine Minutes],&lt;BR /&gt;&amp;nbsp; &amp;nbsp;DimMachineStatus[MachineStatusId] IN {"3", "4" , "16"}&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 17:58:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3331673#M124865</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2023-07-14T17:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help on DAX forumla</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3338656#M125259</link>
      <description>&lt;P&gt;Hello and thanks for reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to divide the forumla and also use your proposal but have error.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If i use&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PMP2 = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Machine Minutes]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;DimMachineStatus&lt;/SPAN&gt;&lt;SPAN&gt;[MachineStatusId]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;16&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Retourn this error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For more info:&lt;BR /&gt;&lt;BR /&gt;Machine Minutes is the name of column in table "Measure" and is a number value&lt;/P&gt;&lt;P&gt;MachineStatusId is a text type of table DimMachineStatus&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I need calculate this:&lt;BR /&gt;&lt;BR /&gt;Need to extract from colum "Machine Minutes" the value of filtre 16 on MachineStatusID (VALUE 1)&lt;BR /&gt;Then divide VALUE 1 with the sum of value MachineStatusID 16, 3,4&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 13:07:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-DAX-forumla/m-p/3338656#M125259</guid>
      <dc:creator>lifesafari</dc:creator>
      <dc:date>2023-07-19T13:07:56Z</dc:date>
    </item>
  </channel>
</rss>

