<?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: Need help to calculate a measure based on another measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232022#M53258</link>
    <description>&lt;P&gt;How i can share a data example please ?&lt;/P&gt;</description>
    <pubDate>Fri, 10 Dec 2021 08:08:36 GMT</pubDate>
    <dc:creator>Touaibia</dc:creator>
    <dc:date>2021-12-10T08:08:36Z</dc:date>
    <item>
      <title>Need help to calculate a measure based on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2231974#M53253</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this data model&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Client table with: IdCustomer / SalesRep / Area / CustomerProfil&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ProductTable : IdProduct / ProductName / 24StrategicProduct&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SalesTable: IdCustomer /IdProduct&amp;nbsp; / Sales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to analyze the performance of 24 strategic products that my company want to push up.&lt;/P&gt;&lt;P&gt;The column &lt;STRONG&gt;24StrategicProduct&lt;/STRONG&gt; contains “true” or “false” statement, which allows me to isolate my 24 strategic products&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 - I want to calculate for each customer the count of strategic products he had purchased.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I did this: &lt;STRONG&gt;NB24 = calculate ( distinctcount(SalesTable [IdProduct]), ProductTable[24StrategicProduct]="true")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And it Works, when I set up a table with all my customers, I do have the count of my strategic products each client has purchased.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2- Now I want to set up a table with my CustomerProfil (which contains only 3 values A B C ) and add a measure that returns the number of customers who have purchased at least one time all my 24 strategic products.&lt;/P&gt;&lt;P&gt;I tried this :&lt;/P&gt;&lt;P&gt;CustomersNb24 = &lt;STRONG&gt;calculate ( distinctcount(SalesTable [IdCustomer]),FILTER(SalesTable, NB24=24))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And it doesn't&amp;nbsp;work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried to use an intermediate formula&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Achv_24 = if (NB24=24,1,0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Then&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Calculate ( distinctcount(SalesTable [IdCustomer]),FILTER(achv_24 = 1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Still doesn't&amp;nbsp;work&lt;/P&gt;&lt;P&gt;I'm stuck on this formula since a week &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Tnx&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 07:33:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2231974#M53253</guid>
      <dc:creator>Touaibia</dc:creator>
      <dc:date>2021-12-10T07:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to calculate a measure based on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232019#M53257</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317974" data-lia-user-login="Touaibia" class="lia-mention lia-mention-user"&gt;Touaibia&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share some example data and expected output?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 08:06:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232019#M53257</guid>
      <dc:creator>jppv20</dc:creator>
      <dc:date>2021-12-10T08:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to calculate a measure based on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232022#M53258</link>
      <description>&lt;P&gt;How i can share a data example please ?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 08:08:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232022#M53258</guid>
      <dc:creator>Touaibia</dc:creator>
      <dc:date>2021-12-10T08:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to calculate a measure based on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232040#M53259</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317974" data-lia-user-login="Touaibia" class="lia-mention lia-mention-user"&gt;Touaibia&lt;/a&gt;&amp;nbsp;you can create a table here and put in some example data, doesn't have to be the actual numbers&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 08:17:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232040#M53259</guid>
      <dc:creator>jppv20</dc:creator>
      <dc:date>2021-12-10T08:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to calculate a measure based on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232092#M53260</link>
      <description>&lt;P&gt;sales_table :&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;IdCustomer&amp;nbsp;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;IdProduct&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Sales&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;50£&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;40£&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;10£&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;20£&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;21£&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;...etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ProductTable&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;IdProduct&amp;nbsp;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;ProductName&amp;nbsp;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;24StrategicProduct&amp;nbsp;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Dummy1&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;True&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;Dummy2&lt;/TD&gt;&lt;TD&gt;True&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;Dummy3&lt;/TD&gt;&lt;TD&gt;True&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;Dummy4&lt;/TD&gt;&lt;TD&gt;False&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;...etc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Client table&amp;nbsp;:&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;IdCustomer&amp;nbsp;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;SalesRep &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Area &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;CustomerProfil&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Paris&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Paris&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Paris&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Marc&lt;/TD&gt;&lt;TD&gt;Lyon&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Elodie&lt;/TD&gt;&lt;TD&gt;Nice&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our reps have to make sure that our customers purchase at least one time all of our 24 strategic product&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I want to set up a table with :&amp;nbsp;&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;SPAN&gt;CustomerProfil&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;number of customers who ordered all our&amp;nbsp;24 strategic product&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;120&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;TD&gt;230&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Soo I want to evaluate whether or not my customers had purchased all of my 24 strategic products if yes count all this clients and tell, well I have 230 who had purchased my 24 strategic product.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tnx&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 08:43:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232092#M53260</guid>
      <dc:creator>Touaibia</dc:creator>
      <dc:date>2021-12-10T08:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to calculate a measure based on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232312#M53264</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317974" data-lia-user-login="Touaibia" class="lia-mention lia-mention-user"&gt;Touaibia&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you explain how you get this result?&lt;/P&gt;&lt;P&gt;A - 120&lt;/P&gt;&lt;P&gt;B - 50&lt;BR /&gt;C - 60&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think I completely understand what you are trying to achieve here.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 10:17:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232312#M53264</guid>
      <dc:creator>jppv20</dc:creator>
      <dc:date>2021-12-10T10:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to calculate a measure based on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232402#M53267</link>
      <description>&lt;P&gt;I want to calculate the number of customers who had purchased all my 24 staretgic product.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and A-120 B-50 C-60 is just a simulation of the output i'm expecting.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 11:11:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232402#M53267</guid>
      <dc:creator>Touaibia</dc:creator>
      <dc:date>2021-12-10T11:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to calculate a measure based on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232416#M53268</link>
      <description>&lt;P&gt;So what should be the output with this example data?&lt;/P&gt;&lt;P&gt;A - 1,&amp;nbsp;B - 0, C - 0?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 11:22:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232416#M53268</guid>
      <dc:creator>jppv20</dc:creator>
      <dc:date>2021-12-10T11:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to calculate a measure based on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232458#M53269</link>
      <description>&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I want to calculate the number of customers who ordered all my&amp;nbsp; 24 strategic products&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 11:40:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2232458#M53269</guid>
      <dc:creator>Touaibia</dc:creator>
      <dc:date>2021-12-10T11:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to calculate a measure based on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2237131#M53462</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317974" data-lia-user-login="Touaibia" class="lia-mention lia-mention-user"&gt;Touaibia&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Did the reference measure expression include some specific filters or calculate based on particular row contexts? &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;If that is the case, I think you need to manually add the filter effect on these formulas to reproduce that calculation result or they will get the wrong result if you use them to calculate with not related contexts.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;In addition, you can also take a look at the following blogs about row/filter context and reference multiple measure expressions:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://www.sqlbi.com/articles/optimizing-dax-expressions-involving-multiple-measures/" target="_blank"&gt;Optimizing DAX expressions involving multiple measures - SQLBI&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://www.sqlbi.com/articles/row-context-and-filter-context-in-dax/" target="_blank"&gt;Row Context and Filter Context in DAX - SQLBI&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 06:21:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-calculate-a-measure-based-on-another-measure/m-p/2237131#M53462</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-14T06:21:52Z</dc:date>
    </item>
  </channel>
</rss>

