<?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 How to capture a step in a production line using DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capture-a-step-in-a-production-line-using-DAX/m-p/3676642#M142756</link>
    <description>&lt;P&gt;Hi guys,&amp;nbsp;&lt;BR /&gt;I need help with something, I'm doing a project about a production line dashboard and I'm having some issues.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In this case, I have a lot of steps in this production line and the main objective here is to capture one specific moment in the middle of the process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of the data I'm using:&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;Let's say I need to capture the first moment in this process that the product passes by step 3 and consider a value for them, and the other steps I don't consider any values, and if the product gets back for step 2, I don't consider any value if they pass again for the step 3, only the first time and save the date of the first time this product passes by the step 3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can't use a Power Query to do it, because I'm using a Dynamic Connection with the data in this dashboard. It needs to be done using a Measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I have some conditions depending on the product.&lt;/P&gt;&lt;P&gt;Example: If the product is Red I need to capture it in step 3, but if the product is Blue I need to capture the moment they pass for step 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you guys help me with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&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;</description>
    <pubDate>Sat, 03 Feb 2024 00:51:09 GMT</pubDate>
    <dc:creator>HenryG</dc:creator>
    <dc:date>2024-02-03T00:51:09Z</dc:date>
    <item>
      <title>How to capture a step in a production line using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capture-a-step-in-a-production-line-using-DAX/m-p/3676642#M142756</link>
      <description>&lt;P&gt;Hi guys,&amp;nbsp;&lt;BR /&gt;I need help with something, I'm doing a project about a production line dashboard and I'm having some issues.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In this case, I have a lot of steps in this production line and the main objective here is to capture one specific moment in the middle of the process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of the data I'm using:&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;Let's say I need to capture the first moment in this process that the product passes by step 3 and consider a value for them, and the other steps I don't consider any values, and if the product gets back for step 2, I don't consider any value if they pass again for the step 3, only the first time and save the date of the first time this product passes by the step 3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can't use a Power Query to do it, because I'm using a Dynamic Connection with the data in this dashboard. It needs to be done using a Measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I have some conditions depending on the product.&lt;/P&gt;&lt;P&gt;Example: If the product is Red I need to capture it in step 3, but if the product is Blue I need to capture the moment they pass for step 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you guys help me with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&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;</description>
      <pubDate>Sat, 03 Feb 2024 00:51:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capture-a-step-in-a-production-line-using-DAX/m-p/3676642#M142756</guid>
      <dc:creator>HenryG</dc:creator>
      <dc:date>2024-02-03T00:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture a step in a production line using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capture-a-step-in-a-production-line-using-DAX/m-p/3676793#M142774</link>
      <description>&lt;P&gt;To capture a specific moment in a production line using DAX (Data Analysis Expressions), you can create a measure that calculates the date and time when a product passes through a particular step based on certain conditions. Here's how you can achieve this:&lt;/P&gt;&lt;P&gt;Assuming you have a table named ProductionData containing the production line data with columns like Product, Step, and Timestamp, you can create a measure to capture the moment when a product passes through a specific step.&lt;/P&gt;&lt;P&gt;Here's a general structure of how you might implement the measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Capture Moment =&lt;BR /&gt;VAR CurrentProduct = SELECTEDVALUE('ProductionData'[Product])&lt;BR /&gt;VAR CurrentStep = SELECTEDVALUE('ProductionData'[Step])&lt;BR /&gt;VAR CaptureStep =&lt;BR /&gt;IF(&lt;BR /&gt;CurrentProduct = "Red" &amp;amp;&amp;amp; CurrentStep = 3,&lt;BR /&gt;1,&lt;BR /&gt;IF(&lt;BR /&gt;CurrentProduct = "Blue" &amp;amp;&amp;amp; CurrentStep = 2,&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;CaptureStep = 1,&lt;BR /&gt;MINX(&lt;BR /&gt;FILTER(&lt;BR /&gt;'ProductionData',&lt;BR /&gt;'ProductionData'[Product] = CurrentProduct &amp;amp;&amp;amp;&lt;BR /&gt;'ProductionData'[Step] = CurrentStep&lt;BR /&gt;),&lt;BR /&gt;'ProductionData'[Timestamp]&lt;BR /&gt;),&lt;BR /&gt;BLANK()&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Explanation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The measure starts by defining variables for the current product and step based on the selected values in your report.&lt;/LI&gt;&lt;LI&gt;It then evaluates the conditions based on the product type and step number to determine if the moment needs to be captured (CaptureStep variable).&lt;/LI&gt;&lt;LI&gt;If the conditions are met, it uses the MINX function to find the minimum timestamp for the selected product and step combination.&lt;/LI&gt;&lt;LI&gt;If the conditions are not met, it returns BLANK().&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;You can adjust this measure according to your actual column names and conditions. Make sure to replace 'ProductionData' with the actual name of your table.&lt;/P&gt;&lt;P&gt;You can then use this measure in your dashboard to display the captured moments for each product based on the conditions specified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2024 05:45:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capture-a-step-in-a-production-line-using-DAX/m-p/3676793#M142774</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-02-03T05:45:03Z</dc:date>
    </item>
  </channel>
</rss>

