Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 48 | |
| 43 | |
| 26 | |
| 19 |
| User | Count |
|---|---|
| 198 | |
| 126 | |
| 102 | |
| 67 | |
| 50 |