Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
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.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 18 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 42 | |
| 40 | |
| 40 | |
| 38 |