<?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 Subtract part of value from category X and add to category Y in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2849178#M91256</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have table Traffic with&amp;nbsp;data like below:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Source&lt;/TD&gt;&lt;TD&gt;Sessions&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Google Ads&lt;/TD&gt;&lt;TD&gt;5000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Organic&lt;/TD&gt;&lt;TD&gt;4500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Brand&lt;/TD&gt;&lt;TD&gt;3000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Social Media&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to substract 40% of sessions from Brand and add this value to Organic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I figured out how to make the first part:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_Brand = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;((&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Traffic'[Sessions]) * &lt;/SPAN&gt;&lt;SPAN&gt;0.4&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;('Traffic'[Source] = &lt;/SPAN&gt;&lt;SPAN&gt;"Brand"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Traffic'[Sesje]) - _Brand&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But I have no idea how to "change" the source of the value received from _Brand variable and&amp;nbsp;add it to the Organic.&amp;nbsp;Or maybe I should do it in a completely different way than I started?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The result should be such values&lt;/DIV&gt;&lt;DIV&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Source&lt;/TD&gt;&lt;TD&gt;Sessions&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Google Ads&lt;/TD&gt;&lt;TD&gt;5000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Organic&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;5700&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Brand&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;1800&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Social Media&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I will be grateful for all the tips.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 18 Oct 2022 13:05:05 GMT</pubDate>
    <dc:creator>jkoclejda</dc:creator>
    <dc:date>2022-10-18T13:05:05Z</dc:date>
    <item>
      <title>Subtract part of value from category X and add to category Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2849178#M91256</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have table Traffic with&amp;nbsp;data like below:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Source&lt;/TD&gt;&lt;TD&gt;Sessions&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Google Ads&lt;/TD&gt;&lt;TD&gt;5000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Organic&lt;/TD&gt;&lt;TD&gt;4500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Brand&lt;/TD&gt;&lt;TD&gt;3000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Social Media&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to substract 40% of sessions from Brand and add this value to Organic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I figured out how to make the first part:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_Brand = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;((&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Traffic'[Sessions]) * &lt;/SPAN&gt;&lt;SPAN&gt;0.4&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;('Traffic'[Source] = &lt;/SPAN&gt;&lt;SPAN&gt;"Brand"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Traffic'[Sesje]) - _Brand&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But I have no idea how to "change" the source of the value received from _Brand variable and&amp;nbsp;add it to the Organic.&amp;nbsp;Or maybe I should do it in a completely different way than I started?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The result should be such values&lt;/DIV&gt;&lt;DIV&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Source&lt;/TD&gt;&lt;TD&gt;Sessions&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Google Ads&lt;/TD&gt;&lt;TD&gt;5000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Organic&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;5700&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Brand&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;1800&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Social Media&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I will be grateful for all the tips.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 18 Oct 2022 13:05:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2849178#M91256</guid>
      <dc:creator>jkoclejda</dc:creator>
      <dc:date>2022-10-18T13:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract part of value from category X and add to category Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2849214#M91258</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try the below measure whether it suits yours requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sessions expected outcome measure: =
VAR _Brand =
    CALCULATE (
        SUM ( 'Traffic'[Sessions] ),
        FILTER ( ALL ( Traffic ), Traffic[Source] = "Brand" )
    ) * 0.4
RETURN
    SWITCH (
        SELECTEDVALUE ( Traffic[Source] ),
        "Brand", SUM ( 'Traffic'[Sessions] ) - _Brand,
        "Organic", SUM ( 'Traffic'[Sessions] ) + _Brand,
        SUM ( Traffic[Sessions] )
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 Oct 2022 13:31:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2849214#M91258</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-10-18T13:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract part of value from category X and add to category Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850410#M91336</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391826" data-lia-user-login="jkoclejda" class="lia-mention lia-mention-user"&gt;jkoclejda&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I have created a simple sample, please refer to my pbix file to see if it helps you.&lt;/P&gt;
&lt;P&gt;Create a column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column =
VAR _brand =
    CALCULATE (
        SUM ( 'Table'[Sessions] ) * 0.4,
        FILTER ( ( 'Table' ), 'Table'[Source] = "Brand" )
    )
RETURN
    IF (
        ( 'Table'[Source] ) = "Brand",
        ( 'Table'[Sessions] ) - _brand,
        IF (
            ( 'Table'[Source] ) = "Organic",
            ( 'Table'[Sessions] ) + _brand,
            ( 'Table'[Sessions] )
        )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 06:10:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850410#M91336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-19T06:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract part of value from category X and add to category Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850675#M91350</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your solution works perfect with data&amp;nbsp;from my example. I tried to apply it to my real data - my table have much more records and columns. I got stuck trying to apply this to another column.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Source Type&lt;/TD&gt;&lt;TD&gt;Source Group&lt;/TD&gt;&lt;TD&gt;Sessions&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;brand google ads&lt;/TD&gt;&lt;TD&gt;Brand&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;brand direct&lt;/TD&gt;&lt;TD&gt;Brand&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;organic&lt;/TD&gt;&lt;TD&gt;Organic&lt;/TD&gt;&lt;TD&gt;3000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;campaign 1&lt;/TD&gt;&lt;TD&gt;Google Ads&lt;/TD&gt;&lt;TD&gt;4000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when I try your solution with column Source Group everything is ok. But when it want to do it with column Source Type end substract from brand direct and then add to to organic it doesn't work (only subtraction works) . But when i do the same with brand direct and brand google ads everything is fine and I don't know why.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 08:22:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850675#M91350</guid>
      <dc:creator>jkoclejda</dc:creator>
      <dc:date>2022-10-19T08:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract part of value from category X and add to category Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850682#M91352</link>
      <description>&lt;P&gt;Hi! Thank you for the answer but i have a question. Why&amp;nbsp;there is 5 000 in total for Measure column instead of 13 500?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 08:25:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850682#M91352</guid>
      <dc:creator>jkoclejda</dc:creator>
      <dc:date>2022-10-19T08:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract part of value from category X and add to category Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850719#M91356</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your feedback.&lt;/P&gt;
&lt;P&gt;What is the expected outcome of the second example?&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;Source Type&lt;/TD&gt;
&lt;TD&gt;Source Group&lt;/TD&gt;
&lt;TD&gt;Sessions&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;brand google ads&lt;/TD&gt;
&lt;TD&gt;Brand&lt;/TD&gt;
&lt;TD&gt;1000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;brand direct&lt;/TD&gt;
&lt;TD&gt;Brand&lt;/TD&gt;
&lt;TD&gt;2000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;organic&lt;/TD&gt;
&lt;TD&gt;Organic&lt;/TD&gt;
&lt;TD&gt;3000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;campaign 1&lt;/TD&gt;
&lt;TD&gt;Google Ads&lt;/TD&gt;
&lt;TD&gt;4000&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, please share your complete sample pbix file' link with how your expected outcome looks like, and then I can try to look into it to come up with a more accurate solution.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 08:51:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850719#M91356</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-10-19T08:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract part of value from category X and add to category Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850774#M91359</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my sample &lt;A href="https://we.tl/t-Vsm5xyLSHd" target="_self"&gt;pbix file&lt;/A&gt; - I&amp;nbsp;reconstructed the issue that i have in my real data&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 09:23:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850774#M91359</guid>
      <dc:creator>jkoclejda</dc:creator>
      <dc:date>2022-10-19T09:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract part of value from category X and add to category Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850783#M91360</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391826" data-lia-user-login="jkoclejda" class="lia-mention lia-mention-user"&gt;jkoclejda&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;5 000 in total for Measure column instead of 13 500&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The measure is like the following:&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="markup"&gt;Measure = var _brand=CALCULATE(MAX('Table'[Sessions])*0.4,FILTER(ALL('Table'),'Table'[Source]="Brand")) return IF(MAX('Table'[Source])="Brand",MAX('Table'[Sessions])-_brand,IF(MAX('Table'[Source])="Organic",MAX('Table'[Sessions])+_brand,MAX('Table'[Sessions])))&lt;/LI-CODE&gt;
&lt;UL&gt;
&lt;LI&gt;The total value returns the max('table'[sessions]', so the max value is 5000.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;You can create another measure based on the measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = var _brand=CALCULATE(MAX('Table'[Sessions])*0.4,FILTER(ALL('Table'),'Table'[Source]="Brand")) return IF(MAX('Table'[Source])="Brand",MAX('Table'[Sessions])-_brand,IF(MAX('Table'[Source])="Organic",MAX('Table'[Sessions])+_brand,MAX('Table'[Sessions]))) 
 &lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 09:15:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850783#M91360</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-19T09:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract part of value from category X and add to category Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850818#M91361</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391826" data-lia-user-login="jkoclejda" class="lia-mention lia-mention-user"&gt;jkoclejda&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please modify your measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sessions_f = 
 VAR _Brand =
    CALCULATE (
        SUM ( 'sample_data'[sessions] ),
        FILTER ( ALL ( 'sample_data' ), 'sample_data'[source_type] = "brand organic" )
    ) * 0.4
RETURN
    SWITCH (
        SELECTEDVALUE ( 'sample_data'[source_group] ),
        "brand", SUM ( 'sample_data'[sessions] ) - _Brand,
        "organic", SUM ( 'sample_data'[sessions]) + _Brand,
        SUM ( 'sample_data'[sessions] )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I have misunderstood your meaning, please provide more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 09:23:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850818#M91361</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-19T09:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract part of value from category X and add to category Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850840#M91366</link>
      <description>&lt;P&gt;I must subtract sessions from "brand organic" in "source_type" column and add it to "organic". But on the report, in table will be source_group as column.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 09:28:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtract-part-of-value-from-category-X-and-add-to-category-Y/m-p/2850840#M91366</guid>
      <dc:creator>jkoclejda</dc:creator>
      <dc:date>2022-10-19T09:28:28Z</dc:date>
    </item>
  </channel>
</rss>

