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
Hello Team,
I have 3 tables (ID, Transaction_Jour and Transaction_Code). I want to bring column "Extra_Purchase_Date" in Transaction_Jour to the table ID with the rules that it brings the first transaction based on the the first date and Revenue_Code "Extra Revenue" which is in the table Transaction_Code.
Example:
Table: ID
| ID | Name |
| 1010 | Max |
| 1020 | Tom |
| 1030 | Harry |
Table: Transaction_Jour
| ID | Extra_Purchase | Extra_Purchase_Date | Extra Code |
| 1010 | Rs 2000 | 05/01/2023 | 8 |
| 1010 | Rs 1700 | 03/01/2023 | 8 |
| 1020 | Rs 1300 | 08/01/2023 | 5 |
| 1030 | Rs 1100 | 04/01/2023 | 4 |
| 1030 | Rs 2000 | 05/01/2023 | 2 |
| 1030 | Rs 1300 | 03/01/2023 | 3 |
Table: Transaction_Code
| Extra Code | Revenue_Code |
| 8 | Extra Revenue |
| 8 | Other Revenue |
| 5 | Extra Revenue |
| 4 | Other Revenue |
| 2 | Extra Revenue |
| 3 | Other Revenue |
Final Table should look like
| ID | Name | Extra_ Purchase_Date |
| 1010 | Max | 03/01/2023 |
| 1020 | Tom | 08/01/2023 |
| 1030 | Harry | 05/01/2023 |
Is there a way i could do this Power BI?
Many Thanks.
Kind Regards,
Hi @Hash2023 ,
Below is my table1:
Below is my table2:
Below is my table3:
The following DAX might work for you:
Extra_Purchase_Date =
var pre_date = MIN(Tracsaction_Jour[Extra_Purchase_Date])
return pre_date
The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Thank you for your response and help. I appreciate your help on this matter.
The proposed idea unfortunately, does not seem to be working in my case. 😞
I pulled the Revenue Code from table 3 into table 1.
I have been trying and the statement below seems to be working:
Many Thanks.
Kind Regards,
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 60 | |
| 43 | |
| 40 | |
| 36 | |
| 21 |
| User | Count |
|---|---|
| 177 | |
| 122 | |
| 110 | |
| 77 | |
| 51 |