<?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: Calculated column for the duplicated account to sum the forecast values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-for-the-duplicated-account-to-sum-the-forecast/m-p/4152179#M165008</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;First create a new calculated column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Total Forecast = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM('Table'[forecast]),&lt;BR /&gt;ALLEXCEPT('Table', 'Table'[Account])&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then create one more calculated column to determine if the account is a Key Account based on the total forecast value:&lt;/P&gt;
&lt;P&gt;Key Account = &lt;BR /&gt;IF('Table'[Total Forecast] &amp;gt; 500000, "Yes", "No")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remove duplicate account names by creating a summarized table.&lt;/P&gt;
&lt;P&gt;SummaryTable = &lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[Account],&lt;BR /&gt;"Total Forecast", SUM('Table'[forecast]),&lt;BR /&gt;"Key Account", IF(SUM('Table'[forecast]) &amp;gt; 500000, "Yes", "No")&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a relationship between the original table and the summarized table if necessary.&lt;/P&gt;
&lt;P&gt;Add the Key Account column to the filter pane. You can now use this column to filter your data based on whether the account is a Key Account or not.&lt;/P&gt;
&lt;P&gt;Create bookmarks to save different views (Yes or No) and use them as needed.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2024 09:53:11 GMT</pubDate>
    <dc:creator>bhanu_gautam</dc:creator>
    <dc:date>2024-09-16T09:53:11Z</dc:date>
    <item>
      <title>Calculated column for the duplicated account to sum the forecast values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-for-the-duplicated-account-to-sum-the-forecast/m-p/4152037#M165001</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on the below case:&lt;/P&gt;&lt;P&gt;Requirements : We have to sum all rows with the same account names but different Offer Types , if the sum of the forecast value is &amp;gt;500K then it is Key Account "Yes" else Key Account "No"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;for example :&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Account&lt;/TD&gt;&lt;TD&gt;Offertype&lt;/TD&gt;&lt;TD&gt;forecast&lt;/TD&gt;&lt;TD&gt;key accounts&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;TD&gt;Q&lt;/TD&gt;&lt;TD&gt;2334&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBB&lt;/TD&gt;&lt;TD&gt;Q&lt;/TD&gt;&lt;TD&gt;34556&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CCC&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;675454&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;499523&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DDD&lt;/TD&gt;&lt;TD&gt;Q&lt;/TD&gt;&lt;TD&gt;65454&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBB&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;9453&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Row 1 : Account name is AAA, Offer type is Q and Forecast value is 2334&lt;BR /&gt;Row 4 : Account name is AAA , Offer type is A and Forecast value is 499523 then the sum of the AAA is &amp;gt;500K then it is "Yes". if row 1 &amp;amp; row 2 has less than 500K forecast value then it is "No"&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Same logic for row 2 &amp;amp; 6 , I need to add this calculated column "Key Accounts" into page filter pane and select Yes or No in different bookmarks. So the account name should be unique with summing forecast values when it publishing in the table visual (no duplicate account names displaying)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help to achieve this asap&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;DK&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 08:14:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-for-the-duplicated-account-to-sum-the-forecast/m-p/4152037#M165001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-16T08:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column for the duplicated account to sum the forecast values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-for-the-duplicated-account-to-sum-the-forecast/m-p/4152179#M165008</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;First create a new calculated column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Total Forecast = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM('Table'[forecast]),&lt;BR /&gt;ALLEXCEPT('Table', 'Table'[Account])&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then create one more calculated column to determine if the account is a Key Account based on the total forecast value:&lt;/P&gt;
&lt;P&gt;Key Account = &lt;BR /&gt;IF('Table'[Total Forecast] &amp;gt; 500000, "Yes", "No")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remove duplicate account names by creating a summarized table.&lt;/P&gt;
&lt;P&gt;SummaryTable = &lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[Account],&lt;BR /&gt;"Total Forecast", SUM('Table'[forecast]),&lt;BR /&gt;"Key Account", IF(SUM('Table'[forecast]) &amp;gt; 500000, "Yes", "No")&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a relationship between the original table and the summarized table if necessary.&lt;/P&gt;
&lt;P&gt;Add the Key Account column to the filter pane. You can now use this column to filter your data based on whether the account is a Key Account or not.&lt;/P&gt;
&lt;P&gt;Create bookmarks to save different views (Yes or No) and use them as needed.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 09:53:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-for-the-duplicated-account-to-sum-the-forecast/m-p/4152179#M165008</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2024-09-16T09:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column for the duplicated account to sum the forecast values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-for-the-duplicated-account-to-sum-the-forecast/m-p/4152277#M165017</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;&amp;nbsp; Thanks for your solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to use the above solution , but I am already having a &lt;STRONG&gt;Total FY Forecast&lt;/STRONG&gt; measure to use "&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total FY Forecast =&lt;/SPAN&gt; &lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Test Delivery Updates'&lt;/SPAN&gt;&lt;SPAN&gt;[FY Forecast]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Test Delivery Updates'&lt;/SPAN&gt;&lt;SPAN&gt;[FY Forecast]&lt;/SPAN&gt;&lt;SPAN&gt;)))&amp;nbsp;&lt;BR /&gt;Because I have many duplicate rows after made a unpivot column concept , so that i have used DISTINCT in the above measure , I am using this measures in the Table visual .&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So I can't use this measure in the summarize DAX .&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;VAR _summarize =&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; SUMMARIZE (&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Test Delivery Updates',&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Test Delivery Updates'[Account Name],&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Test Delivery Updates'[Key Account 1]&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; )&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;VAR _AcName = 'Test Delivery Updates'[Account Name]&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;VAR _FYForecast =&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; SUMX ( FILTER ( _summarize, [Account Name] = _AcName), &lt;FONT color="#FF0000"&gt;[Total FY Forecast]&lt;/FONT&gt; )&amp;nbsp; -- &lt;FONT color="#FF0000"&gt;used my existing measure here&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; IF ( _FYForecast &amp;gt; 500000, "Yes", "No")&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Above is the query i am trying to use but no luck &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Sep 2024 11:13:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-for-the-duplicated-account-to-sum-the-forecast/m-p/4152277#M165017</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-16T11:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column for the duplicated account to sum the forecast values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-for-the-duplicated-account-to-sum-the-forecast/m-p/4153596#M165080</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I create a table as you mentioned.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then I create a measure and here is the DAX code.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
VAR _AccountSum = 
    CALCULATE(
        SUM('Table'[Forecast]),
        ALLEXCEPT('Table', 'Table'[Account])
    )
RETURN
     IF(_AccountSum &amp;gt; 50000, "Yes", "No")&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;So I think you can use a slicer and create a new table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&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;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 03:10:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-for-the-duplicated-account-to-sum-the-forecast/m-p/4153596#M165080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-17T03:10:50Z</dc:date>
    </item>
  </channel>
</rss>

