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 everyone, I have a TABLE A where I have a date, I need to get the TRAVA field of TABLE B with the date equal to or before the date of table A
I am not able to find a solution for this.
Thank you for your help
Hi @Spotto ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Spotto ,
Please try:
Create a measure:
Measure = MAXX(FILTER('TABLE B',[CONTRATO]=MAX('TABLE A'[CONTRATO])&&[DATA]<=MAX('TABLE A'[DATA])),[TRAVA])
Then Apply it to the visual
Output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thanks for the help but I needed to return the same date or before the date. In the example contract 222b has the date jan/05, the same or earlier date would be jan/03 and the result would be F
@Spotto , A new column in Tbale A
New column =
var _max = maxx(filter(TableB, TableB[Contrado] = TableA[Contrado] && TableB[Date] <= TableA[Date]), TableB[Date])
return
maxx(filter(TableB, TableB[Contrado] = TableA[Contrado] && TableB[Date] =_max ), TableB[TRAVA])
thanks @amitchandak for the help but it didn't work, I'll put the link to the power bi file with your suggestion. Could you please check?
https://drive.google.com/file/d/1Sm6jmkDKnbBpANWUrj3vzHO1sT0zfu4e/view?usp=sharing
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |