Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am fairly new to power bi, but experienced in MSAccess vba. This project has been a bit of a challenge for me.
I have 2 tables, Contracts & Tickets. I am trying to find the contract number with a start date that was just prior to the ticket opened date.
Contracts:
Itm | Contract | StartDt | EndDt |
Aaa | 123 | 12/1/18 | 12/3/18 |
BBB | 124 | 12/1/18 | 12/4/18 |
BBB | 126 | 12/5/18 | 12/12/18 |
Aaa | 128 | 12/6/18 | 12/10/18 |
Ticket:
TickNbr | Itm | Opened |
5678 | Aaa | 12/4/18 |
5679 | Aaa | 12/7/18 |
5680 | BBB | 11/30/18 |
Results:
TickNbr | Itm | Contract |
5678 | Aaa | 123 |
5679 | Aaa | 128 |
5680 | BBB | Null |
Any help would be appreciated!
Solved! Go to Solution.
@Anonymous
Try this as a calculated column in Ticket Table
Calc Column in Ticket Table = MINX ( TOPN ( 1, FILTER ( Contracts, Contracts[Itm] = Ticket[Itm] && Contracts[StartDt] < Ticket[Opened] ), Contracts[StartDt], DESC ), [Contract] )
@Anonymous
Try this as a calculated column in Ticket Table
Calc Column in Ticket Table = MINX ( TOPN ( 1, FILTER ( Contracts, Contracts[Itm] = Ticket[Itm] && Contracts[StartDt] < Ticket[Opened] ), Contracts[StartDt], DESC ), [Contract] )
Thank you! Worked perfect!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |