Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi all,
I am an intermediate dax user but Im struggling to figure out how to do this.
I have a table (call it Sales) with part number and sale transaction date. I have a second table (call it Pricing) with a list of part numbers and MSRP selling prices with start dates and end dates. So, in this second table, I have part numbers listed several times with date ranges (start dates and end dates) for each new price that they have had over time. This creates a many to many relationship if I try to connect part number in the two tables.
What I want to do is create a calculated column in the Sales table that looks at the Pricing table and picks the MSRP for the date range which the transaction date is in. In other words, for a given line in the Sales table, take the part number and the transaction date, and look in the Pricing table for the part number and the start date and end date range that contains the transaction date and report back to the column the MSRP that from the Pricing table that meets that criterion.
here is what I came up with, but it doesnt work
Solved! Go to Solution.
Here's what worked for me:
I have a Product Pricing table with ProductKey, StartDate, EndDate, and Price.
I have a Sales table that has ProductKey and Date.
In the Sales table I created the following column:
Here's what worked for me:
I have a Product Pricing table with ProductKey, StartDate, EndDate, and Price.
I have a Sales table that has ProductKey and Date.
In the Sales table I created the following column:
thats perfect... thank you!!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
120 | |
110 | |
59 | |
57 |