Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi girls & guys,
I have 2 very simple tables:
1.) Sales
2.) Product Table
Now as you can see within the Product table, there's one item, "2536" or "TV Remoate", that comes at different pricing options, depending on the quantity customers purchase it at.
Since there are no unique values, I'm staying away from building a relationship within the model itself. I would much rather create a separate, calculated column within the Sales table, listing the price according to quantity ordered.
Now I would presume, that the easiest way would be a Lookupvalue function creating the column. But I'm having trouble entering it so it aggregates properly.
Could anyone kindly help me out or suggest if there's an easier option to do this?
Thanks in advance!
Solved! Go to Solution.
Hi,
I suggest creating Product table like below.
And then, Range of MIn column and Max column can be used like below.
Please check the attached pbix file. All Calculated Columns are in the attached pbix file.
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 there!
may I pick up this problem from before and inquire about one more piece of coding to what has worked as a charm so far?
My Product table now has 2 additional columns with a mix of current and historic prices that have changed due to price increases. I would now need the code to not only aggregate by quantity amount but also by which time window the sales price has been valid for if that makes sense?
Thanks guys!
Did the trick, beautifully! Thank you kindly!!
Hi,
I suggest creating Product table like below.
And then, Range of MIn column and Max column can be used like below.
Please check the attached pbix file. All Calculated Columns are in the attached pbix file.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
18 | |
16 | |
15 | |
12 | |
10 |