Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi guys,
I need help with something, I'm doing a project about a production line dashboard and I'm having some issues.
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.
Here is an example of the data I'm using:
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.
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.
And I have some conditions depending on the product.
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.
Can you guys help me with this?
Thank you.
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:
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.
Here's a general structure of how you might implement the measure:
Capture Moment =
VAR CurrentProduct = SELECTEDVALUE('ProductionData'[Product])
VAR CurrentStep = SELECTEDVALUE('ProductionData'[Step])
VAR CaptureStep =
IF(
CurrentProduct = "Red" && CurrentStep = 3,
1,
IF(
CurrentProduct = "Blue" && CurrentStep = 2,
1,
0
)
)
RETURN
IF(
CaptureStep = 1,
MINX(
FILTER(
'ProductionData',
'ProductionData'[Product] = CurrentProduct &&
'ProductionData'[Step] = CurrentStep
),
'ProductionData'[Timestamp]
),
BLANK()
)
Explanation:
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.
You can then use this measure in your dashboard to display the captured moments for each product based on the conditions specified.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 23 | |
| 14 | |
| 10 | |
| 6 | |
| 5 |