The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi there. Converting from Tableau, so please be gentle!
I have two tables:-
In the ORDER table, I am wanting to return the nearest [DEPT] match based on the DEPT table.
So for Case Refs 123 and 456, it should return "A" as the [Order Date] falls between the [Date Change] dates in the DEPT table.
Cases 789 and 987, returns "B" and so forth.
I have the DEPT table sorted by [Name] then ascending [DATE CHANGE].
Many thanks for your valued advice in advance. 🙂
Solved! Go to Solution.
Hi, I am not sure how your datamodel looks like but please check the below if it suits your requirement.
It is for creating a new column.
Department CC =
MAXX (
FILTER (
Department,
Department[Date Change]
= MAXX (
FILTER (
Department,
Department[Name] = 'Order'[Name]
&& Department[Date Change] <= 'Order'[Order Date]
),
Department[Date Change]
)
),
Department[Dept]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, I am not sure how your datamodel looks like but please check the below if it suits your requirement.
It is for creating a new column.
Department CC =
MAXX (
FILTER (
Department,
Department[Date Change]
= MAXX (
FILTER (
Department,
Department[Name] = 'Order'[Name]
&& Department[Date Change] <= 'Order'[Order Date]
),
Department[Date Change]
)
),
Department[Dept]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
57 | |
32 | |
20 | |
17 | |
15 |
User | Count |
---|---|
56 | |
31 | |
30 | |
24 | |
21 |