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
Hi all!
I have a dataset with two queries on a group of employees.
Query A loads data from a monthly updated database, where I've applied the step to only keep the data for the snapshots with the newest date (in this case "2019M05") and the data for snapshots at the end of the year ("XXXM12").
Query B loads data from an Excel report, which has no snapshot column and is based on the situation as per the current day.
In Query A, I apply a step where I create a column to make a unique identifier, combining the snapshot and the employee ID. So if employee 48193 has been working for 4 years within our company, this person will get the following four unique identifiers for each of the 4 rows this person is in:
Employee ID | Snapshot | Unique Identifier
48193 | 2019M05 | 2019M0548193
48193 | 2018M12 | 2018M1248193
48193 | 2017M12 | 2017M1248193
48193 | 2016M12 | 2016M1248193
The issue is creating the right relationship between my two queries. In Query B, I'd like to add a Unique Identifier column as well, based on the youngest snapshot date in Query A (as there is no snapshot in query B and the data in query B is only applicable to the youngest rows in Query A).
Any support would be much appreciated 🙂
Hi @Nipius,
I'm not so clear for 'query B' data structure, can you please explain more about this?
How to Get Your Question Answered Quickly
In addition, you can consider to add column to extract and merge year part and employee id to create a bridge table to link two tables.
Regards,
Xiaoxin Sheng
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 61 | |
| 46 | |
| 40 | |
| 38 | |
| 22 |
| User | Count |
|---|---|
| 178 | |
| 127 | |
| 117 | |
| 77 | |
| 56 |