Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am struck in one of the process to get the worked location of each employee for each date as i am not sure how to use Loop in DAX.
I have two tables as Worked location Table and Location Transfer Table as shown below and i want to get the worked location details in the worked location table from the Location Transfer Table as show in the 3rd table. Can you please help how to do it in PBI DAX. Thanks
Worked Location Table | ||
Date | Employee ID | Worked Location |
01-May-23 | 12301 | |
02-May-23 | 12301 | |
03-May-23 | 12301 | |
04-May-23 | 12301 | |
05-May-23 | 12301 | |
06-May-23 | 12301 | |
07-May-23 | 12301 | |
08-May-23 | 12301 | |
09-May-23 | 12301 | |
10-May-23 | 12301 |
Location Transfer Table | |||
Employee ID | Worked Location | From Date | To Date |
12301 | MCC | 01-May-23 | 03-May-23 |
12301 | DCC | 04-May-23 | 08-May-23 |
12301 | IBN | 09-May-23 |
Worked Location Table | RESULT | |
Date | Employee ID | Worked Location |
01-May-23 | 12301 | MCC |
02-May-23 | 12301 | MCC |
03-May-23 | 12301 | MCC |
04-May-23 | 12301 | DCC |
05-May-23 | 12301 | DCC |
06-May-23 | 12301 | DCC |
07-May-23 | 12301 | DCC |
08-May-23 | 12301 | DCC |
09-May-23 | 12301 | IBN |
10-May-23 | 12301 | IBN |
Solved! Go to Solution.
Hi @Ahmedx
Ihave 2 table in my Power BI report B-Details and SPResult. SP result table is a stored procedure and will change dynamically with parameters. I want to create a new table from this in which it should filter Name and Country from B-Details and SPResult. Now after filtering this we have a uniquekey in B-Details. Now in the new table for each UniqueKey we have to get all the filtered values from SPResult table. So in the new table UniqueKey key row will be duplicated with as much rows we have in SPResult. Can you help me how to fix this?
create a new topic, show what you want to get, because it is not clear what you need
Thank you very much Ahmed, It really worked.