<?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 the difference of values in a column within a same value in another column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-difference-of-values-in-a-column-within-a-same/m-p/2481217#M67917</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;, I was trying to create as a measure, now I tried to create anew column.&lt;BR /&gt;In the var _min calculation, the Dax recognizes the columns DescPlaca and IdQuestionario, but in the calculation in the return, these columns are not recognized. The following mesage appears:&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Parameter is not the correct type.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Cannot find name '[DescPlaca]'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2022 18:07:36 GMT</pubDate>
    <dc:creator>renanc</dc:creator>
    <dc:date>2022-04-27T18:07:36Z</dc:date>
    <item>
      <title>Calculate the difference of values in a column within a same value in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-difference-of-values-in-a-column-within-a-same/m-p/2480627#M67874</link>
      <description>&lt;P&gt;Hi everybody,&lt;BR /&gt;&lt;BR /&gt;I am trying to calculate the difference of the KM between the checklists, for the same car plate (DescPlaca), and I am trying to do the Context in the same way I would do for DATEDIFF, but for some reason it does not work. Can anybody help me with this, please?&lt;BR /&gt;I wanna calculate the "Digite a KM" value less the Previous checklist "Digite a KM" value, for this, I have to use IdChecklist, so the IdChecklist for the first term has to be bigger than IdChecklist for the second term, and DescPlaca has to be equal.&lt;BR /&gt;I am trying to use the following dax. can anybody spot what is wrong, please?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Diferenca KM = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FIRSTNONBLANK&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;fChecklists[IdChecklist]&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;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;fChecklists&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;fChecklists[IdChecklist]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[IdChecklist]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;fChecklists[DescPlaca]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[DescPlaca]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;fChecklists[DtCadastro]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[DtCadastro]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;fChecklists[IdQuestionario]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[IdQuestionario]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 13:34:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-difference-of-values-in-a-column-within-a-same/m-p/2480627#M67874</guid>
      <dc:creator>renanc</dc:creator>
      <dc:date>2022-04-27T13:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the difference of values in a column within a same value in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-difference-of-values-in-a-column-within-a-same/m-p/2481033#M67900</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="170024" data-lia-user-login="renanc" class="lia-mention lia-mention-user"&gt;renanc&lt;/a&gt; , A new column like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diferenca KM =&lt;BR /&gt;var _min = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;FIRSTNONBLANK(fChecklists[IdChecklist],0),&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL(fChecklists),&lt;BR /&gt;fChecklists[IdChecklist] &amp;gt; EARLIER([IdChecklist])&lt;BR /&gt;&amp;amp;&amp;amp; fChecklists[DescPlaca]=EARLIER([DescPlaca])&lt;BR /&gt;&amp;amp;&amp;amp; fChecklists[DtCadastro] &amp;gt;= EARLIER([DtCadastro])&lt;BR /&gt;&amp;amp;&amp;amp; fChecklists[IdQuestionario] = EARLIER([IdQuestionario])&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;return &lt;BR /&gt;CALCULATE(&lt;BR /&gt;min([Digite a KM]) &lt;BR /&gt;FILTER(&lt;BR /&gt;ALL(fChecklists),&lt;BR /&gt;fChecklists[IdChecklist] = _min&lt;BR /&gt;&amp;amp;&amp;amp; fChecklists[DescPlaca]=EARLIER([DescPlaca])&lt;BR /&gt;&amp;amp;&amp;amp; fChecklists[IdQuestionario] = EARLIER([IdQuestionario])&lt;BR /&gt;)&lt;BR /&gt;) - [Digite a KM]&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 16:23:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-difference-of-values-in-a-column-within-a-same/m-p/2481033#M67900</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-04-27T16:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the difference of values in a column within a same value in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-difference-of-values-in-a-column-within-a-same/m-p/2481217#M67917</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;, I was trying to create as a measure, now I tried to create anew column.&lt;BR /&gt;In the var _min calculation, the Dax recognizes the columns DescPlaca and IdQuestionario, but in the calculation in the return, these columns are not recognized. The following mesage appears:&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Parameter is not the correct type.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Cannot find name '[DescPlaca]'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 18:07:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-difference-of-values-in-a-column-within-a-same/m-p/2481217#M67917</guid>
      <dc:creator>renanc</dc:creator>
      <dc:date>2022-04-27T18:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the difference of values in a column within a same value in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-difference-of-values-in-a-column-within-a-same/m-p/2482144#M67995</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="170024" data-lia-user-login="renanc" class="lia-mention lia-mention-user"&gt;renanc&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You missed a comma "," after &lt;EM&gt;min([Digite a KM])&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 06:18:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-difference-of-values-in-a-column-within-a-same/m-p/2482144#M67995</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-28T06:18:35Z</dc:date>
    </item>
  </channel>
</rss>

