<?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 New Conditional Column Calculation based on (non-value) other column entry in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Conditional-Column-Calculation-based-on-non-value-other/m-p/2636428#M77293</link>
    <description>&lt;P&gt;Hi, I'm relatively new to PBI and I wanted to create a column showing the 'Bonus' amount (the new 'outcome' column) but based on a calculation of either ("Sales Rev" x "Multiplier") or ("Sales+Referrals Rev" x "Multiplier)".&lt;/P&gt;&lt;P&gt;So for example, if the entry in Column B ("Level") = 'Junior', the multiply column &lt;U&gt;C&lt;/U&gt; ("Sales Rev" which is itself a sum of certain columns) by the column E ("Multiplier", which is itself a calculated field).&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if the entry in Column B("Level") = 'Exec', the multiply column &lt;U&gt;D&lt;/U&gt; ("Sales Rev + Referrals" which is itself a sum of different columns) by the column E ("Multiplier").&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;I'm working in the Transform Data table at the moment, and would appreciate any guidance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've copied the data back into excel to illustrate what i'm trying to show...&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;Much appreciated,&lt;/P&gt;&lt;P&gt;Bx&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jul 2022 23:36:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-13T23:36:35Z</dc:date>
    <item>
      <title>New Conditional Column Calculation based on (non-value) other column entry</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Conditional-Column-Calculation-based-on-non-value-other/m-p/2636428#M77293</link>
      <description>&lt;P&gt;Hi, I'm relatively new to PBI and I wanted to create a column showing the 'Bonus' amount (the new 'outcome' column) but based on a calculation of either ("Sales Rev" x "Multiplier") or ("Sales+Referrals Rev" x "Multiplier)".&lt;/P&gt;&lt;P&gt;So for example, if the entry in Column B ("Level") = 'Junior', the multiply column &lt;U&gt;C&lt;/U&gt; ("Sales Rev" which is itself a sum of certain columns) by the column E ("Multiplier", which is itself a calculated field).&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if the entry in Column B("Level") = 'Exec', the multiply column &lt;U&gt;D&lt;/U&gt; ("Sales Rev + Referrals" which is itself a sum of different columns) by the column E ("Multiplier").&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;I'm working in the Transform Data table at the moment, and would appreciate any guidance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've copied the data back into excel to illustrate what i'm trying to show...&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;Much appreciated,&lt;/P&gt;&lt;P&gt;Bx&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 23:36:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Conditional-Column-Calculation-based-on-non-value-other/m-p/2636428#M77293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-13T23:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: New Conditional Column Calculation based on (non-value) other column entry</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Conditional-Column-Calculation-based-on-non-value-other/m-p/2637096#M77346</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;You may start with presenting sample of your source data and then build on it your expected result. Power Bi works in a different way than excel does therefore, it is better that first you clearly define the starting point along with the expected outcome then you can provide more details about how the numbers are calculated.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 18:38:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Conditional-Column-Calculation-based-on-non-value-other/m-p/2637096#M77346</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-13T18:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: New Conditional Column Calculation based on (non-value) other column entry</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Conditional-Column-Calculation-based-on-non-value-other/m-p/2652136#M78233</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the calculation logic provided in your screenshot (Columns &lt;STRONG&gt;J&lt;/STRONG&gt; and &lt;STRONG&gt;K&lt;/STRONG&gt;), it seems that the calculation logic you describe and the calculation results do not match. If the values in column &lt;STRONG&gt;J&lt;/STRONG&gt; are correct, then the calculation logic should be as follows:&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;If Level = "Junior", then it is (Sales Rev1+Sales Rev2+Sales Rev3)*&lt;FONT color="#FF0000"&gt;2&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;If Level = "Exec", then it is (Sales Rev1+Sales Rev2+Sales Rev3+Sales Rev4)*&lt;FONT color="#FF0000"&gt;3&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;If it is other level, it is 0.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;If my understanding above is correct, you can create the following&lt;STRONG&gt; calculated column&lt;/STRONG&gt; or &lt;STRONG&gt;measure&lt;/STRONG&gt; to get the Bonus... Please find the details in &lt;EM&gt;&lt;STRONG&gt;the attachment&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Calculated column:&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Bonus = 
VAR _srev = 'Table'[Sales Rev1] + 'Table'[Sales Rev2] + 'Table'[Sales Rev3]
VAR _srefrev = 'Table'[Sales Rev1] + 'Table'[Sales Rev2] + 'Table'[Sales Rev3] + 'Table'[Sales Rev4]
RETURN
    SWITCH ( 'Table'[Level], "Junior", _srev * 2, "Exec", _srefrev * 3, 0 )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG&gt;Measure:&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure_Bonus = 
VAR _srev =
    SUM ( 'Table'[Sales Rev1] ) + SUM ( 'Table'[Sales Rev2] )
        + SUM ( 'Table'[Sales Rev3] )
VAR _srefrev =
    SUM ( 'Table'[Sales Rev1] ) + SUM ( 'Table'[Sales Rev2] )
        + SUM ( 'Table'[Sales Rev3] )
        + SUM ( 'Table'[Sales Rev4] )
RETURN
    SWITCH (
        SELECTEDVALUE ( 'Table'[Level] ),
        "Junior", _srev * 2,
        "Exec", _srefrev * 3,
        0
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 07:16:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Conditional-Column-Calculation-based-on-non-value-other/m-p/2652136#M78233</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-21T07:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: New Conditional Column Calculation based on (non-value) other column entry</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Conditional-Column-Calculation-based-on-non-value-other/m-p/2657784#M78674</link>
      <description>&lt;P&gt;Brilliant - thank you so much - it was the formula that I was looking for, so thank you so much for helping me out with that! And you're quite right re the columns (they weren't the important bits, I'd simplified them to be able to share, but thank you)!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 01:12:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Conditional-Column-Calculation-based-on-non-value-other/m-p/2657784#M78674</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-25T01:12:13Z</dc:date>
    </item>
  </channel>
</rss>

