<?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 Handling missing values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Handling-missing-values/m-p/3321963#M124353</link>
    <description>&lt;P&gt;Hey ,&lt;/P&gt;&lt;P&gt;I am working on a sales dashboard where, in one table I have the total target of the year for each salesperson according to department and new/existing customer. In another table, the target achieved to date for each salesperson according to department and new/existing customer is listed. Since some departments or existing/new targets have not been met, they are not in the dataset yet, so when I try to put a visual for any department and/or for new or existing customers, it shows existing data instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please tell me how I can solve this problem?&lt;/P&gt;</description>
    <pubDate>Sun, 09 Jul 2023 15:17:56 GMT</pubDate>
    <dc:creator>_Janwi31</dc:creator>
    <dc:date>2023-07-09T15:17:56Z</dc:date>
    <item>
      <title>Handling missing values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Handling-missing-values/m-p/3321963#M124353</link>
      <description>&lt;P&gt;Hey ,&lt;/P&gt;&lt;P&gt;I am working on a sales dashboard where, in one table I have the total target of the year for each salesperson according to department and new/existing customer. In another table, the target achieved to date for each salesperson according to department and new/existing customer is listed. Since some departments or existing/new targets have not been met, they are not in the dataset yet, so when I try to put a visual for any department and/or for new or existing customers, it shows existing data instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please tell me how I can solve this problem?&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jul 2023 15:17:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Handling-missing-values/m-p/3321963#M124353</guid>
      <dc:creator>_Janwi31</dc:creator>
      <dc:date>2023-07-09T15:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Handling missing values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Handling-missing-values/m-p/3324139#M124468</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="577127" data-lia-user-login="_Janwi31" class="lia-mention lia-mention-user"&gt;_Janwi31&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(1)Create a new table that merges the data from the two tables and fills in the missing data with zeros.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CombinedTable = 
UNION (
    SELECTCOLUMNS (
        'TotalTarget',
        "Salesperson", 'TotalTarget'[Salesperson],
        "Department", 'TotalTarget'[Department],
        "CustomerType", 'TotalTarget'[CustomerType],
        "Target", 'TotalTarget'[Target],
        "Achieved", 0
    ),
    SELECTCOLUMNS (
        'TargetAchieved',
        "Salesperson", 'TargetAchieved'[Salesperson],
        "Department", 'TargetAchieved'[Department],
        "CustomerType", 'TargetAchieved'[CustomerType],
        "Target", 0,
        "Achieved", 'TargetAchieved'[Achieved]
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(2)Create a new measure to calculate the sum of the target and realized values for each combination of salesperson, department, and customer type:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TotalTargetAndAchieved = 
SUMX (
    SUMMARIZE (
        'CombinedTable',
        'CombinedTable'[Salesperson],
        'CombinedTable'[Department],
        'CombinedTable'[CustomerType],
        "TotalTarget", SUM ( 'CombinedTable'[Target] ),
        "TotalAchieved", SUM ( 'CombinedTable'[Achieved] )
    ),
    [TotalTarget] + [TotalAchieved]
)&lt;/LI-CODE&gt;
&lt;P&gt;(3)Then the result is as follows.&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;
&lt;P&gt;If the above one can't help you get the desired result, please provide some&amp;nbsp;&lt;STRONG&gt;sample data&lt;/STRONG&gt;&amp;nbsp;in your tables (&lt;STRONG&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/STRONG&gt;) with&amp;nbsp;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with backend logic and special examples.&amp;nbsp;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;pbix file.&amp;nbsp;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 07:16:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Handling-missing-values/m-p/3324139#M124468</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-19T07:16:02Z</dc:date>
    </item>
  </channel>
</rss>

