<?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: A measure that calculates sales based on a table with bonuses in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3002167#M101401</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494374" data-lia-user-login="IrekK" class="lia-mention lia-mention-user"&gt;IrekK&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the information i have got, i make a&amp;nbsp;flow chart you can refer to&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;and can you provide some sample data that i can provide more solution for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2023 01:48:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-05T01:48:50Z</dc:date>
    <item>
      <title>A measure that calculates sales based on a table with bonuses</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3001881#M101380</link>
      <description>&lt;P&gt;Hi, I can't figure out a metric that will calculate the sold quantity of the products I have in the "Bonus Products" table.&lt;BR /&gt;The bonus products table contains articles that are selected in monthly cycles, but it happens that the action for a given product may last several days. Hence the Start and End date.&lt;BR /&gt;In addition, it may happen that the same product in one week of the month may be priced at $10 and the next week its price will be $15.&lt;BR /&gt;Too difficult a task for my strength.&lt;BR /&gt;Help me find a solution, hints.&lt;BR /&gt;Thank you in advance&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;</description>
      <pubDate>Wed, 04 Jan 2023 20:49:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3001881#M101380</guid>
      <dc:creator>IrekK</dc:creator>
      <dc:date>2023-01-04T20:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: A measure that calculates sales based on a table with bonuses</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3002167#M101401</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494374" data-lia-user-login="IrekK" class="lia-mention lia-mention-user"&gt;IrekK&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the information i have got, i make a&amp;nbsp;flow chart you can refer to&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;and can you provide some sample data that i can provide more solution for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 01:48:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3002167#M101401</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-05T01:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: A measure that calculates sales based on a table with bonuses</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3006921#M101770</link>
      <description>&lt;P&gt;hello Yolo Zhu, thanks for your willingness to help. please write in what form I can post sample data here, generally I have a sample prepared in pbx.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jan 2023 12:49:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3006921#M101770</guid>
      <dc:creator>IrekK</dc:creator>
      <dc:date>2023-01-07T12:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: A measure that calculates sales based on a table with bonuses</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3007762#M101879</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494374" data-lia-user-login="IrekK" class="lia-mention lia-mention-user"&gt;IrekK&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can provide picture of sample data or you can put your pbix file to your onedrive, then share the link here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 01:17:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3007762#M101879</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-09T01:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: A measure that calculates sales based on a table with bonuses</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3009802#M102009</link>
      <description>&lt;P&gt;Hi, finally I was able to put the file in onedrive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AvSMwqcJvxJvgZQEctRS-wtP5iO0pA?e=bMm4l4" target="_blank"&gt;https://1drv.ms/u/s!AvSMwqcJvxJvgZQEctRS-wtP5iO0pA?e=bMm4l4&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 20:55:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3009802#M102009</guid>
      <dc:creator>IrekK</dc:creator>
      <dc:date>2023-01-09T20:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: A measure that calculates sales based on a table with bonuses</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3010608#M102055</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494374" data-lia-user-login="IrekK" class="lia-mention lia-mention-user"&gt;IrekK&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on my understanding of the information you have provided , I create a measure to calculate total quantities&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total_salequantity = var _startdate=DATE(MAX(BONUS[Year]),MAX(BONUS[Month]),RIGHT(MAX(BONUS[DimDateStart]),2))
var _enddate=DATE(MAX(BONUS[Year]),MAX(BONUS[Month]),RIGHT(MAX(BONUS[DimDateEnd]),2))
return CALCULATE(SUM(SALES[Quantity]),DATESBETWEEN('CALENDAR'[Date],_startdate,_enddate))&lt;/LI-CODE&gt;
&lt;P&gt;and I change the cross filter between Bonus table and Article table to 'Both'&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If the information above cannot meet your requirement, can you provide more information? such as What&amp;nbsp; do you want to calculate, total sales or toal quantities. from the information you have offered, you want to calculate total quantities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 08:24:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-that-calculates-sales-based-on-a-table-with-bonuses/m-p/3010608#M102055</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-10T08:24:18Z</dc:date>
    </item>
  </channel>
</rss>

