<?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: Variable Category in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Category/m-p/4251521#M168355</link>
    <description>&lt;LI-CODE lang="markup"&gt;My data is more than one client &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data &lt;STRONG&gt;that fully covers your issue&lt;/STRONG&gt;.&lt;BR /&gt;Please show the expected outcome based on the sample data you provided.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2024 23:12:23 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-10-21T23:12:23Z</dc:date>
    <item>
      <title>Variable Category</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Category/m-p/4251213#M168332</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to work out a way of categorising data where those categories update when filters are applied. The data I'm using can't be shared so I will use generic notes to explain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A client, say Bob, has work done from team A, B and C which all charge fees. I have a set of fee categories such as, "£1m+", "£750k-£1m", etc... which categorises all of my clients based on their fees. Say Bobs fees are £1.2m, Bob lies within the "£1m+" category. So this is looking at the sum of the Fees of Team A for Bob, Team B for Bob, Team C for Bob.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Client&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Team&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Fees&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Bob&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;300,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Bob&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;500,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Bob&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;400,000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before filtering - £1,200,000, gives category of £1m+.&lt;/P&gt;&lt;P&gt;If I then filter to just Team A, I want it to then see fees are £300,000, so £250k-£500k category.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data is more than one client so then want to be able to list it like the below which can then be filtered by Team.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Category&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Fees&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;£1m+&lt;/TD&gt;&lt;TD&gt;XXXX&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;£750k-£1m&lt;/TD&gt;&lt;TD&gt;XXX&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;and so on....&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help in advance&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 16:49:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Category/m-p/4251213#M168332</guid>
      <dc:creator>KyleAD0110</dc:creator>
      <dc:date>2024-10-21T16:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Category</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Category/m-p/4251521#M168355</link>
      <description>&lt;LI-CODE lang="markup"&gt;My data is more than one client &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data &lt;STRONG&gt;that fully covers your issue&lt;/STRONG&gt;.&lt;BR /&gt;Please show the expected outcome based on the sample data you provided.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 23:12:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Category/m-p/4251521#M168355</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-21T23:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Category</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Category/m-p/4255331#M168567</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="828536" data-lia-user-login="KyleAD0110" class="lia-mention lia-mention-user"&gt;KyleAD0110&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, do you want to filter the table by Team and show the type of total Fee per Team for each client? If so, here is my test for your reference. Please reply to me if I missed anything. I also attached pbix file for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Measure1: Calculate sum of Fees for each client.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TotalFees = VAR selectedTeam = SELECTEDVALUE('Table'[Team])
RETURN IF(ISBLANK(selectedTeam),CALCULATE(SUM('Table'[Fees]),FILTER(ALL('Table'),'Table'[Client]=MAX('Table'[Client]))),CALCULATE(SUM('Table'[Fees]),FILTER(ALL('Table'),'Table'[Client]=MAX('Table'[Client])&amp;amp;&amp;amp;'Table'[Team]=selectedTeam)))&lt;/LI-CODE&gt;
&lt;P&gt;Measure2: Set category acoording to total of fees.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Category = IF([TotalFees]&amp;gt;=1000000,"£1m+",IF([TotalFees]&amp;gt;=750000,"£750k-£1m","below £750k"))&lt;/LI-CODE&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Mengmeng Li&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 02:34:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Category/m-p/4255331#M168567</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-24T02:34:44Z</dc:date>
    </item>
  </channel>
</rss>

