<?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: Changing number based on slicer and multiplying that new number by a value based on criteria in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-number-based-on-slicer-and-multiplying-that-new-number/m-p/4091202#M162368</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&amp;nbsp;DataNinja777&amp;nbsp; for your prompt reply, please allow me to share some content here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's some dummy data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Main Table"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;“Percent change”&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;“Price entry”&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a relationship.&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;Create a measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _MONTH = SELECTEDVALUE('Price entry'[Month])
VAR _Price = SELECTEDVALUE('Price entry'[Price])
VAR _Percent = SELECTEDVALUE('Percent change'[Percent change]) * 0.01
VAR _TOTAL = 
    CALCULATE(
        SUM('Main Table'[Quantity]),
        FILTER(
            ALL('Main Table'),
            'Main Table'[Fiscal Month] = MAX('Main Table'[Fiscal Month])
            &amp;amp;&amp;amp;
            'Main Table'[Fiscal Month] = _MONTH
        )
    )

RETURN 
IF(
    _Percent &amp;lt; 0,
    (_TOTAL + _TOTAL * _Percent) * _Price,
    (_TOTAL - _TOTAL * _Percent) * _Price
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, 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;
&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;</description>
    <pubDate>Fri, 09 Aug 2024 08:36:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-08-09T08:36:41Z</dc:date>
    <item>
      <title>Changing number based on slicer and multiplying that new number by a value based on criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-number-based-on-slicer-and-multiplying-that-new-number/m-p/4081223#M162010</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to ask for some assistance with this measure ZI am trying to complete. I am wanting to take a quantity value and multiply that number by a selected slicer value that ranges for -10% to 10%. I want to then take that and multiply it but a price value based on month of the year and one of four cuts. Every single cut has a different price by month, so there are basically 48 rows in the price tabl;e and I want the new quantity value that is affected by the slicer to multiply bny its associated price value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess an example I would give is lets say there was a January&amp;nbsp;23rd transaction with a quantity of 40000 and the cut was Belly. I would want to be able to take that 40000 and on the slicer select a % increase or decrease. So lets say i choose -2%, I would want the new value to be 39,200. I then would want to take that 39,200 and multiply it by the price of January&amp;nbsp;Belly. So lets say the January&amp;nbsp;belly cost is 1.50, the ending transaction cost would be 58,800. I basically want to do that for every single transaction individually based on cut and month ideally in a singular measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are soime images of my main table, the percent change table and the price entry table.&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 12:22:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-number-based-on-slicer-and-multiplying-that-new-number/m-p/4081223#M162010</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-05T12:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Changing number based on slicer and multiplying that new number by a value based on criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-number-based-on-slicer-and-multiplying-that-new-number/m-p/4082479#M162059</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The quantity in your screenshot shows all values as zero, but I assume this is just a sample. I also assume that your fact table with quantity information contains data about the four cuts in addition to date information. With this assumption, I would create a dimension table for the cuts and a calendar table. Then, I would apply the multiplication of quantity by price based on the month and cuts filtering.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 13:48:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-number-based-on-slicer-and-multiplying-that-new-number/m-p/4082479#M162059</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2024-08-09T13:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Changing number based on slicer and multiplying that new number by a value based on criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-number-based-on-slicer-and-multiplying-that-new-number/m-p/4091202#M162368</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&amp;nbsp;DataNinja777&amp;nbsp; for your prompt reply, please allow me to share some content here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's some dummy data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Main Table"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;“Percent change”&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;“Price entry”&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a relationship.&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;Create a measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _MONTH = SELECTEDVALUE('Price entry'[Month])
VAR _Price = SELECTEDVALUE('Price entry'[Price])
VAR _Percent = SELECTEDVALUE('Percent change'[Percent change]) * 0.01
VAR _TOTAL = 
    CALCULATE(
        SUM('Main Table'[Quantity]),
        FILTER(
            ALL('Main Table'),
            'Main Table'[Fiscal Month] = MAX('Main Table'[Fiscal Month])
            &amp;amp;&amp;amp;
            'Main Table'[Fiscal Month] = _MONTH
        )
    )

RETURN 
IF(
    _Percent &amp;lt; 0,
    (_TOTAL + _TOTAL * _Percent) * _Price,
    (_TOTAL - _TOTAL * _Percent) * _Price
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, 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;
&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;</description>
      <pubDate>Fri, 09 Aug 2024 08:36:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-number-based-on-slicer-and-multiplying-that-new-number/m-p/4091202#M162368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-09T08:36:41Z</dc:date>
    </item>
  </channel>
</rss>

