<?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 Sum measure with Null or blank value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2445563#M65610</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a measure that sets the profit target (in %) for each project. However some projects are not entitled to a target and therefore I'd like to set-up "N/A", or "blank", or "null", what ever works. Note that 0 is a target (no profit basically) so 0 cannot be used instead of blanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;This is the measure&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Profit target = SWITCH(LEFT(SELECTEDVALUE(dProjects[Project No.]),5),"T4035",0.25,"T4042",0.0,"T4045",0.0,"T4048",0.0,"T4051",0.25,"T4053",-0.25,"T4056",0.25,"null value or something").&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;U&gt;Then I have another measure&amp;nbsp;&lt;SPAN&gt;that will make a calulation based on "profit target". &lt;/SPAN&gt;&lt;/U&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Income target =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dProjects,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;('dProjects'[Profit target] + 1 ) * 'fForecastUSD'[Spendings]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The problem is that when I enter anything else than a number at the end of the switch function in the first measure (here represented by "null value or something") "income target" returns an error.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How do i get the "income target" to ignore non numeric values?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thanks for your help.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 08 Apr 2022 09:33:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-04-08T09:33:28Z</dc:date>
    <item>
      <title>Sum measure with Null or blank value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2445563#M65610</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a measure that sets the profit target (in %) for each project. However some projects are not entitled to a target and therefore I'd like to set-up "N/A", or "blank", or "null", what ever works. Note that 0 is a target (no profit basically) so 0 cannot be used instead of blanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;This is the measure&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Profit target = SWITCH(LEFT(SELECTEDVALUE(dProjects[Project No.]),5),"T4035",0.25,"T4042",0.0,"T4045",0.0,"T4048",0.0,"T4051",0.25,"T4053",-0.25,"T4056",0.25,"null value or something").&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;U&gt;Then I have another measure&amp;nbsp;&lt;SPAN&gt;that will make a calulation based on "profit target". &lt;/SPAN&gt;&lt;/U&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Income target =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dProjects,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;('dProjects'[Profit target] + 1 ) * 'fForecastUSD'[Spendings]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The problem is that when I enter anything else than a number at the end of the switch function in the first measure (here represented by "null value or something") "income target" returns an error.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How do i get the "income target" to ignore non numeric values?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thanks for your help.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 08 Apr 2022 09:33:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2445563#M65610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-08T09:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sum measure with Null or blank value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2445840#M65624</link>
      <description>&lt;P&gt;You can either use BLANK() as the final argument to SWITCH or don't have any final argument, as the default behaviour of SWITCH is to return a blank value if none of the conditions are met.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 11:31:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2445840#M65624</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-04-08T11:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sum measure with Null or blank value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2447988#M65781</link>
      <description>&lt;P&gt;Thanks johnt75. I made a table of the returned values of the swtich, and BLANK() is actually returned as "0". Any idea?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 01:11:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2447988#M65781</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-11T01:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sum measure with Null or blank value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2448916#M65855</link>
      <description>&lt;P&gt;can you post the code?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 08:45:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2448916#M65855</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-04-11T08:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sum measure with Null or blank value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2450771#M65944</link>
      <description>&lt;P&gt;my bad discard the previous messages, it actually return blank, and I was looking at a measure i made that calculates the target and sets o if blank. My problem is not fundamentally resolved because my totals do not get calculated, but I found a workaround which is to split between 2 tables, one containing projects with targets, and the other which is containing projects without targets. I 'll close the ticket and reopen one with the new issues i'll face.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 11:57:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2450771#M65944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-12T11:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sum measure with Null or blank value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2451051#M65969</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;;&lt;/P&gt;
&lt;P&gt;You could modify it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;Income target =
IF([Profit target]&amp;lt;&amp;gt;"null value or something",
SUMX (
dProjects,
('dProjects'[Profit target] + 1 ) * 'fForecastUSD'[Spendings]
))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final output is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 04:28:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2451051#M65969</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2022-04-12T04:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sum measure with Null or blank value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2451748#M66007</link>
      <description>&lt;P&gt;Thanks, i'll try that&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 08:30:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2451748#M66007</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-12T08:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sum measure with Null or blank value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2452324#M66049</link>
      <description>&lt;P&gt;I have tryed, but i actually have to update all the measures and formulas that use the profit target as an argument with an IF, which is pretty inconvinient, and my totals are not calculated anymore.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 11:44:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2452324#M66049</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-12T11:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sum measure with Null or blank value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2453635#M66122</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;;&lt;/P&gt;
&lt;P&gt;You can fix total with the &lt;A href="https://docs.microsoft.com/en-us/dax/isinscope-function-dax" target="_self"&gt;ISINSCOPE&lt;/A&gt; function. If not, can you share a simple file and the output you want?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 01:46:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-measure-with-Null-or-blank-value/m-p/2453635#M66122</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2022-04-13T01:46:15Z</dc:date>
    </item>
  </channel>
</rss>

