This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I have two tables. The first table is a list of containers, charge codes and amounts. See sample table with charges totalling 1400.
The second table is a list of containers, order lines and physical volume. There is a many-to-many relationship between these tables.
I want to setup a formula that will allocate the freight costs pro rata based on the volume as show below.
I just can't seem to get the bridge table and formulas right for this. Any help would be very much appeciated.
I also want to set this up in a way where I can link addition information to the container (many from this results table to a single key in the container table) and also additional order information (again, many from this results table to a single key in the order table). I don't think this will be an issue but just wanted to make sure that any solution keeps this in mind.
Thanks for your help getting the inital table merged. This is already a big step forward.
Edited and updated from earlier post. I am now getting a result that is not an error, however the values seem to be divided by the volume an extra time.
I could take the result and multiply it again by the volume to force the correct solution, but, is there a more elegant way to get the original formula?
Hi @X3svfdB1HOjKYc0,
Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
@X3svfdB1HOjKYc0 , Merge these two tables in power Query
: https://radacad.com/append-vs-merge-in-power-bi-and-power-query
a new column in DAX =
divide([Amount] , sumx(filter(Table, [Container $] = earlier( [Container $]) && [Charge] = earlier( [Charge]) ), [Volume] ))
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 33 | |
| 26 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 43 | |
| 28 | |
| 24 | |
| 22 |