<?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: Is there an easy way to split out targets over months based on fixed percentage? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-an-easy-way-to-split-out-targets-over-months-based-on/m-p/1901492#M41008</link>
    <description>&lt;P&gt;Needed a little extra fiddling due to my salespeople complexity but it worked like a charm!&lt;BR /&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jun 2021 13:24:16 GMT</pubDate>
    <dc:creator>KatrienVds</dc:creator>
    <dc:date>2021-06-15T13:24:16Z</dc:date>
    <item>
      <title>Is there an easy way to split out targets over months based on fixed percentage?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-an-easy-way-to-split-out-targets-over-months-based-on/m-p/1900660#M40988</link>
      <description>&lt;P&gt;Hi power bi community,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'm searching for an efficiënt way to create my monthly targets in power bi. It seems like such an 'easy' question but I cant wrap my head around it. Probably making it a lot more difficult than it should be.&lt;/P&gt;&lt;P&gt;Currently I have everything stored in yearly targets (&amp;amp; types) per salesperson. For the example I narrowed it down to users only.&lt;/P&gt;&lt;DIV class="s-table-container"&gt;&amp;nbsp; &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Salesperson&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;target 2019&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;target 2020&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;target 2021&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Person 1&lt;/TD&gt;&lt;TD&gt;100.000&lt;/TD&gt;&lt;TD&gt;200.000&lt;/TD&gt;&lt;TD&gt;100.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Person 2&lt;/TD&gt;&lt;TD&gt;200.000&lt;/TD&gt;&lt;TD&gt;150.000&lt;/TD&gt;&lt;TD&gt;100.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Person 3&lt;/TD&gt;&lt;TD&gt;100.000&lt;/TD&gt;&lt;TD&gt;100.000&lt;/TD&gt;&lt;TD&gt;200.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Person 4&lt;/TD&gt;&lt;TD&gt;250.000&lt;/TD&gt;&lt;TD&gt;200.000&lt;/TD&gt;&lt;TD&gt;250.000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;Now I want to spread it out over 'monthly' targets. There is a 'fixed' percentage of those yearly targets that is needed per user per month. Which I also stored in a table so I can change those easily if the estimated percentages would change over time.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class="s-table-container"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Month&amp;nbsp;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;percent&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;5%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;10%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;10%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;11%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;Which leads me to having to create somthing like this, I think thats the easiest way to use the data in different graphs to split out my monthly target over monthly sales.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class="s-table-container"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;YYYY&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;MM&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Salesperson&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;month target&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Person 1&lt;/TD&gt;&lt;TD&gt;5.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Person 2&lt;/TD&gt;&lt;TD&gt;10.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2019&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Person 1&lt;/TD&gt;&lt;TD&gt;10.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2019&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Person 2&lt;/TD&gt;&lt;TD&gt;20.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Person 1&lt;/TD&gt;&lt;TD&gt;10.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Person 2&lt;/TD&gt;&lt;TD&gt;7.500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Person 1&lt;/TD&gt;&lt;TD&gt;5.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Person 2&lt;/TD&gt;&lt;TD&gt;5.000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;Is there a formula or easy way to achieve this? I feel like it shouldn't be this hard to build / calculate this table.&lt;/P&gt;&lt;P&gt;The 'target table' and the 'percentage' table are manually entered tables and the 'Date' table is a calculated one in power bi. Which means I can't run an SQL query with cases as an import statement. I don't want to have to manually start working out all the calculations in excel so I can copy paste that into a new table. It would also limit my abilities to change the monthly percentages in the future, making me have to recalculate everything.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I've seen something remotely similar but that goes from months to days with a crossjoin but in this case the percentage I need per month is already pre-defined and it shouldn't generally split out over all months.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Already tried making the sum per year and show those in a table next to the dates so I could split those out over the percentages per month but then I miss my sales people. Which is also required to watch it on person level not only month level.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 08:11:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-an-easy-way-to-split-out-targets-over-months-based-on/m-p/1900660#M40988</guid>
      <dc:creator>KatrienVds</dc:creator>
      <dc:date>2021-06-15T08:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to split out targets over months based on fixed percentage?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-an-easy-way-to-split-out-targets-over-months-based-on/m-p/1901204#M40994</link>
      <description>&lt;P&gt;Yes, it's not that hard to do but you have to slightly change the model to suit Power BI Best Practices. Details below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Your input table must be in this form:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The monthly percentage table can remain as is. Then here's the Monthly Targets table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And the code that does it:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Monthly Targets = 
SELECTCOLUMNS(
    ADDCOLUMNS(
        CROSSJOIN(
            'Yearly Targets',
            'Monthly Percentage'
        ),
        "@Target",
            var YearlyTarget = 'Yearly Targets'[Target]
            var MonthlyPercentage = 'Monthly Percentage'[Percent]
            var MonthlyTarget = YearlyTarget * MonthlyPercentage
            return
                MonthlyTarget
    ),
    "Year", [Year],
    "Month", [Month],
    "Salesperson", [Person],
    "Month Target", [@Target]
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;You should always stick to Best Practices of data modeling if you want to have an easy time working in Power BI.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 11:20:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-an-easy-way-to-split-out-targets-over-months-based-on/m-p/1901204#M40994</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-15T11:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to split out targets over months based on fixed percentage?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-an-easy-way-to-split-out-targets-over-months-based-on/m-p/1901492#M41008</link>
      <description>&lt;P&gt;Needed a little extra fiddling due to my salespeople complexity but it worked like a charm!&lt;BR /&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 13:24:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-an-easy-way-to-split-out-targets-over-months-based-on/m-p/1901492#M41008</guid>
      <dc:creator>KatrienVds</dc:creator>
      <dc:date>2021-06-15T13:24:16Z</dc:date>
    </item>
  </channel>
</rss>

