<?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: Measure with Filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2492123#M68664</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="350206" data-lia-user-login="Xaraja" class="lia-mention lia-mention-user"&gt;Xaraja&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you can try this code, use max to get the value of current item:&lt;/P&gt;
&lt;PRE&gt;Before Dollar Value = 
CALCULATE ( 
    max(Transactions[item_qty]) * max(Transactions[Products.Price Multiplier]) * max(Warehouse[Average]),
Transaction[System Cycle] = "System Cycle Count"
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&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, 04 May 2022 02:06:41 GMT</pubDate>
    <dc:creator>v-chenwuz-msft</dc:creator>
    <dc:date>2022-05-04T02:06:41Z</dc:date>
    <item>
      <title>Measure with Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2486415#M68294</link>
      <description>&lt;P&gt;I feel like this should be obvious but I am not finding anything on Google that seems relevant so maybe I'm missing something. I am working with an existing dataset that was working but now isn't so I'm trying to troubleshoot. I have two tables:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Warehouse transactions, a list of all events in the warehouse such as qty adjustments due to cycle counts, picking, packing, shipping, etc.&lt;/LI&gt;&lt;LI&gt;Warehouse inventory, a list of current inventory including current costing for each product&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I have a measure that looks like this:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Before Dollar Value = &lt;/SPAN&gt;&lt;SPAN&gt;Transactions[item_qty]&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;Transactions[Products.Price Multiplier]&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;RELATED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Warehouse[Average]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The measure is calculating the on hand qty of the product, multiplied by a price multiplier (sometimes the pricing is multiplied by 100 or 1000 because supply chain is complicated) and then by the average cost stored in the warehouse table.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;My problem is that I need to filter the table somehow to only run this calculation when the transaction type is System Cycle Count (Transaction Type is another column in the Transactions table). I feel like I've seen calculations like this before, but I can't find anything now. Am I thinking about this wrong?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I could duplicate the table in Power Query and filter it to System Cycle Count, but it's about 7 million rows so I hate to do that.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Apr 2022 19:23:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2486415#M68294</guid>
      <dc:creator>Xaraja</dc:creator>
      <dc:date>2022-04-29T19:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2486430#M68295</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="350206" data-lia-user-login="Xaraja" class="lia-mention lia-mention-user"&gt;Xaraja&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you mean something like this? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;Before Dollar Value = 
CALCULATE ( 
    Transactions[item_qty] * Transactions[Products.Price Multiplier] * RELATED(Warehouse[Average]),
Transaction[System Cycle] = "System Cycle Count"
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 19:35:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2486430#M68295</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2022-04-29T19:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2486432#M68296</link>
      <description>&lt;P&gt;I get an error with that that says "A single value for column 'item_qty' in table 'Transactions' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 19:41:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2486432#M68296</guid>
      <dc:creator>Xaraja</dc:creator>
      <dc:date>2022-04-29T19:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2486435#M68297</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="350206" data-lia-user-login="Xaraja" class="lia-mention lia-mention-user"&gt;Xaraja&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you try creating a calculated column instead of a measure with the code I provided above? If so, try it with a measure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Otherwise feel free to share some screenshots or even better, some example data!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 19:46:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2486435#M68297</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2022-04-29T19:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2492123#M68664</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="350206" data-lia-user-login="Xaraja" class="lia-mention lia-mention-user"&gt;Xaraja&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you can try this code, use max to get the value of current item:&lt;/P&gt;
&lt;PRE&gt;Before Dollar Value = 
CALCULATE ( 
    max(Transactions[item_qty]) * max(Transactions[Products.Price Multiplier]) * max(Warehouse[Average]),
Transaction[System Cycle] = "System Cycle Count"
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&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, 04 May 2022 02:06:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-Filter/m-p/2492123#M68664</guid>
      <dc:creator>v-chenwuz-msft</dc:creator>
      <dc:date>2022-05-04T02:06:41Z</dc:date>
    </item>
  </channel>
</rss>

