<?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 Sales Tracking against target in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094190#M162467</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="785449" data-lia-user-login="Lodewyk" class="lia-mention lia-mention-user"&gt;Lodewyk&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please try the following measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Month target =
IF (
    CALCULATE (
        SELECTEDVALUE ( Sales[Sales] ) &amp;gt; SELECTEDVALUE ( Target[Target] ),
        FILTER ( 'Sales', SELECTEDVALUE ( Target[Period] ) = "Monthly" )
    ),
    "yes",
    "no"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Year target =
IF (
    CALCULATE (
        SUM ( Sales[Sales] ) &amp;gt; SELECTEDVALUE ( Target[Target] ),
        FILTER ( ALL ( 'Sales' ), SELECTEDVALUE ( Target[Period] ) = "Annual" )
    ),
    "yes",
    "no"
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jayleny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Aug 2024 01:59:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-08-12T01:59:14Z</dc:date>
    <item>
      <title>Calculate Sales Tracking against target</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4093902#M162458</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 tables namely the target table and sales table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the target table indicates the resource, with the target and whether it is monthly or annually. When the target is annual, the SUM of sales must be checked against the yearly target. When the target period is set to monthly, then every month the resource must achieve that target, there are no carryovers from the previous month.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to present how the employee is tracking against the annual and monthly target&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Aug 2024 20:08:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4093902#M162458</guid>
      <dc:creator>Lodewyk</dc:creator>
      <dc:date>2024-08-11T20:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Sales Tracking against target</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094190#M162467</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="785449" data-lia-user-login="Lodewyk" class="lia-mention lia-mention-user"&gt;Lodewyk&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please try the following measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Month target =
IF (
    CALCULATE (
        SELECTEDVALUE ( Sales[Sales] ) &amp;gt; SELECTEDVALUE ( Target[Target] ),
        FILTER ( 'Sales', SELECTEDVALUE ( Target[Period] ) = "Monthly" )
    ),
    "yes",
    "no"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Year target =
IF (
    CALCULATE (
        SUM ( Sales[Sales] ) &amp;gt; SELECTEDVALUE ( Target[Target] ),
        FILTER ( ALL ( 'Sales' ), SELECTEDVALUE ( Target[Period] ) = "Annual" )
    ),
    "yes",
    "no"
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jayleny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 01:59:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094190#M162467</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-12T01:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Sales Tracking against target</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094209#M162470</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="785449" data-lia-user-login="Lodewyk" class="lia-mention lia-mention-user"&gt;Lodewyk&lt;/a&gt;,&amp;nbsp;try this code, and if you encounter any issues, let me know.&lt;/P&gt;&lt;P&gt;At first, go to "Modeling" tab and create a new calculated column in the Target table:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;MonthlyTarget = IF(Target[Period] = "Annual", Target[Target] / 12, Target[Target])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Then, create a new measure in the Sales table to sum the sales year-to-date for employees with an annual target:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CumulativeSales = 
CALCULATE(
    SUM(Sales[Sales]),
    FILTER(
        ALL(Sales),
        Sales[Resource] = MAX(Sales[Resource]) &amp;amp;&amp;amp;
        Sales[Reporting Month] &amp;lt;= MAX(Sales[Reporting Month])
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;After that, create a new measure to calculate how much of the target has been achieved:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PercentageAchieved = 
IF(
    RELATED(Target[Period]) = "Annual",
    DIVIDE([CumulativeSales], RELATED(Target[Target]), 0),
    DIVIDE(SUM(Sales[Sales]), RELATED(Target[MonthlyTarget]), 0)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;then add your charts (table,&amp;nbsp;bar, line) and a slicer&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 02:16:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094209#M162470</guid>
      <dc:creator>ahadkarimi</dc:creator>
      <dc:date>2024-08-12T02:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Sales Tracking against target</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094480#M162484</link>
      <description>&lt;P&gt;Thanks for the above. After the Related syntax, no option appears. I tried to add the table and column name but it says does not exist. Please assist&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 05:13:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094480#M162484</guid>
      <dc:creator>Lodewyk</dc:creator>
      <dc:date>2024-08-12T05:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Sales Tracking against target</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094489#M162485</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="785426" data-lia-user-login="ahadkarimi" class="lia-mention lia-mention-user"&gt;ahadkarimi&lt;/a&gt;&amp;nbsp;, please see above and the pbix&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 05:22:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094489#M162485</guid>
      <dc:creator>Lodewyk</dc:creator>
      <dc:date>2024-08-12T05:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Sales Tracking against target</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094507#M162487</link>
      <description>&lt;P&gt;&lt;A title="pbix sample" href="https://www.dropbox.com/scl/fi/6hr9j906l7999x1rotrek/Calculate-Sales-Tracking-against-target.pbix?rlkey=eal60g2ugky9mfy02ptsb11hn&amp;amp;st=3r1ecgoi&amp;amp;dl=0" target="_self"&gt;Calculate-Sales-Tracking-against-target.pbix&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 05:31:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4094507#M162487</guid>
      <dc:creator>Lodewyk</dc:creator>
      <dc:date>2024-08-12T05:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Sales Tracking against target</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4095679#M162530</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="785449" data-lia-user-login="Lodewyk" class="lia-mention lia-mention-user"&gt;Lodewyk&lt;/a&gt;I'll do it with pride.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 14:31:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4095679#M162530</guid>
      <dc:creator>ahadkarimi</dc:creator>
      <dc:date>2024-08-12T14:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Sales Tracking against target</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4095681#M162531</link>
      <description>&lt;P&gt;If you encounter any issues, let me know.&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>Mon, 12 Aug 2024 14:32:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4095681#M162531</guid>
      <dc:creator>ahadkarimi</dc:creator>
      <dc:date>2024-08-12T14:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Sales Tracking against target</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4095685#M162532</link>
      <description>&lt;P&gt;Here is the &lt;A title="PBIX file" href="https://www.dropbox.com/scl/fi/5hu9d7g6k0xo6bu0lyr9y/Calculate-Sales-Tracking-against-target.pbix?rlkey=jzfhyklrpy2crzrt4q5150ums&amp;amp;st=i78fc0qn&amp;amp;dl=0" target="_self"&gt;PBIX file&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 14:33:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4095685#M162532</guid>
      <dc:creator>ahadkarimi</dc:creator>
      <dc:date>2024-08-12T14:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Sales Tracking against target</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4095976#M162545</link>
      <description>&lt;P&gt;Thank you, much appreciate&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 18:09:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Sales-Tracking-against-target/m-p/4095976#M162545</guid>
      <dc:creator>Lodewyk</dc:creator>
      <dc:date>2024-08-12T18:09:33Z</dc:date>
    </item>
  </channel>
</rss>

