Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
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.
Check out the April 2026 Power BI update to learn about new features.
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.
| User | Count |
|---|---|
| 41 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 62 | |
| 31 | |
| 26 | |
| 25 |