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.
Hi all,
I'm struggling for a long time with applying a weighted average with three Tables for a specific item over time. I've seen other issues regarding weighted average, but not in this format.
Relationship Tables:
Table 1: Spend. Here the spend contains an identifier, date and price.
Table 2: Commodities; This table contains the raw commidities [items] that influence the price of our spend. The items are accompanied by a date + price.
Table 3: Weights. The weights have a weight [value], an Item and an Identifier.
Solution:
What I want is that, if I select an an identifier (say identifier = 1), that the filtered weights [Table 3, where Identifier =1] are multiplied by Table 1. Hence, 30% * 60, 30% * 63, 40% * 64. I've tried many different routes, including an inner join summation or a dynamic column based on a VAR, but they don't work. The final goal would be to link the weights again to an index, (which you can also find in the file), but I think I can manage the last part myself. Your help would be very much appreciated!
Link: Weighted Average of Indices.pbix
@Justinnn , add a new column in table 2 using Table 2
New values = Table2[price] * maxx(filter(Table3, Table3[Item] = Table2[Item]) , Table3[Value])
refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8
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 |
---|---|
45 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
71 | |
49 | |
45 | |
20 | |
17 |