Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hello!
I am trying to create a new column in my whse_tran table (first screenshot) with SHIFT_ID assigned to every transaction (row) based on a shift_sched table (secondscreenshot). Shift ID is determined by the START_TIME of the transaction. Could someone help me with the DAX script to accurately bring in shift IDs into transactional data?
Thank you!!!!
Solved! Go to Solution.
Filter shift_sched for START_TIME between SHIFT_START and SHIFT_END and take the (max) SHIFT_ID corresponding to that filtered table.
MAXX (
FILTER (
shift_sched,
shift_sched[SHIFT_START] <= whse_tran[START_TIME]
&& whse_tran[START_TIME] < shift_sched[SHIFT_END]
),
shift_sched[SHIFT_ID]
)
Filter shift_sched for START_TIME between SHIFT_START and SHIFT_END and take the (max) SHIFT_ID corresponding to that filtered table.
MAXX (
FILTER (
shift_sched,
shift_sched[SHIFT_START] <= whse_tran[START_TIME]
&& whse_tran[START_TIME] < shift_sched[SHIFT_END]
),
shift_sched[SHIFT_ID]
)
Perfect!!! Thank you so very much, Alexis!!!!
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
17 | |
14 | |
12 | |
9 | |
8 |