<?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 Subtract a constant from a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-a-constant-from-a-measure/m-p/2506775#M69433</link>
    <description>&lt;P&gt;I'm trying to create a measure on DAX that have to subtract 2 measures from a constant (that is 14). The problem is that when I calculate it it duplicates the results row. Here's the formula:&lt;/P&gt;&lt;P&gt;Missed flows =&amp;nbsp;(14 - CALCULATE( DMSFact'[# Not Available] ) )-'DMSFact'[Dealer_TOT_Y]&lt;/P&gt;&lt;P&gt;where&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Not Available and&amp;nbsp;Dealer_TOT_Y are two count measure:&lt;/P&gt;&lt;P&gt;Dealer_TOT_Y =&lt;BR /&gt;CALCULATE(COUNT('DMSFact'[Dealer Int])&lt;BR /&gt;,'DMSFact'[Dealer Int]="Y"&lt;BR /&gt;,GROUPBY('DMSFact','DMSFact'[Dealer Code]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Not Available =&lt;BR /&gt;CALCULATE(COUNT('DMSFact'[Flag NotAvailable])&lt;BR /&gt;,'DMSFact'[Flag NotAvailable]="Y"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result I want to display is the Missed flows for each dealer, in such a form:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Insted I get this:&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>Wed, 11 May 2022 07:15:38 GMT</pubDate>
    <dc:creator>MarcoT</dc:creator>
    <dc:date>2022-05-11T07:15:38Z</dc:date>
    <item>
      <title>Subtract a constant from a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-a-constant-from-a-measure/m-p/2506775#M69433</link>
      <description>&lt;P&gt;I'm trying to create a measure on DAX that have to subtract 2 measures from a constant (that is 14). The problem is that when I calculate it it duplicates the results row. Here's the formula:&lt;/P&gt;&lt;P&gt;Missed flows =&amp;nbsp;(14 - CALCULATE( DMSFact'[# Not Available] ) )-'DMSFact'[Dealer_TOT_Y]&lt;/P&gt;&lt;P&gt;where&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Not Available and&amp;nbsp;Dealer_TOT_Y are two count measure:&lt;/P&gt;&lt;P&gt;Dealer_TOT_Y =&lt;BR /&gt;CALCULATE(COUNT('DMSFact'[Dealer Int])&lt;BR /&gt;,'DMSFact'[Dealer Int]="Y"&lt;BR /&gt;,GROUPBY('DMSFact','DMSFact'[Dealer Code]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Not Available =&lt;BR /&gt;CALCULATE(COUNT('DMSFact'[Flag NotAvailable])&lt;BR /&gt;,'DMSFact'[Flag NotAvailable]="Y"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result I want to display is the Missed flows for each dealer, in such a form:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Insted I get this:&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>Wed, 11 May 2022 07:15:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-a-constant-from-a-measure/m-p/2506775#M69433</guid>
      <dc:creator>MarcoT</dc:creator>
      <dc:date>2022-05-11T07:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract a constant from a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-a-constant-from-a-measure/m-p/2507501#M69464</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="381789" data-lia-user-login="MarcoT" class="lia-mention lia-mention-user"&gt;MarcoT&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please use&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Missed flows =
VAR NotAvilable = [# Not Available]
VAR Dealer = [Dealer_TOT_Y]
RETURN
    IF (
        NOT ISBLANK ( NotAvilable ) || NOT ISBLANK ( Dealer ),
        14 - NotAvilable - Dealer
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 11 May 2022 10:38:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-a-constant-from-a-measure/m-p/2507501#M69464</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-11T10:38:22Z</dc:date>
    </item>
  </channel>
</rss>

