weighted
4 TopicsApplying different weights on each level of hierarchy
Hello, I have PnL fact table like this: fact_table([id],[date],[account_key],[sales_amount]) and dimension for PnL hierarchy like this: dimension_table([account_key],[level_1_name],[level_2_name],[level_2_weight],[level_3_name],[level_3_weight],[level_4_name],[level_4_weight],[level_5_name],[level_5_weight]) relationship between those table is M:N through account_key. I need to calculate sum of sales_amount with applying the correct weight when going from a lower level of the hierarchy to a higher one. Not all levels for each account is valid -> each level except one can be null. I tried everything with INSCOPE, RELATED, SWITCH and SUMX but nothing worked for me. Link to the file here: PBIX I would very much appreciate any help. Thank you very much in advance.1.3KViews0likes7Commentsmeasure to distribute specific row share among the other row values as per share percentage
I have a data something like below table, and the need is to distribute the blank tag cost among the other tag according to their related share of not blank value. Example.. tag cost aaa 100 bbb 10 ccc 40 ddd 50 (blank) 80 bbb 60 ccc 30 ddd 20 aaa 40 (blank) 500 (blank) 100 Expected calculation for aaa the share will be "140/(100+20+30+50+60+30+20+40)" = 40% of 680 for bbb the share will be "70/(100+20+30+50+60+30+20+40)" = 20% of 680 for ccc the share will be "70/(100+20+30+50+60+30+20+40)" = 20% of 680 for ddd the share will be "70/(100+20+30+50+60+30+20+40)" = 20% of 680 expected solution tag cost %share total Share aaa 140 40% of 680 272 bbb 70 20% of 680 136 ccc 70 20% of 680 136 ddd 70 20% of 680 136Solved1.6KViews0likes4CommentsHow to create a measured column by disaggregating a value based on weights listed in a column
Hi community, I am struggling with a rather theoretically easy task but not immediate on DAX that has kept me busy for a while. I need to create a measured column by disaggregating a value based on some weights that are listed in a column. So, as an example, the value I want to diasaggregate is 100 and the weights are listed in a column as: Weights 0.3 0.4 0.6 0.3 0.4 The result I am targeting in this example is: Weights Values 0.3 15 0.4 20 0.6 30 0.3 15 0.4 20 Any idea? Thanks, WalterSolved879Views0likes2CommentsCreating a weighted average across 3 factors
I have a problem that I can't seem to resolve easily in PBI. I can get it to work in excel with a series of steps but need a solution for a set of customers, that is filterable from my dimension tables. I need to create a weighted average for a client out of a group of clients, 8 in total. Based on a combination of 3 factors; Driver Age, Vehicle Age, Region. In excel I would work out the distribution of count of claims across a concatenation of these factors as a percentage, example below. Then average the each distinct group. Key: UK Region, Driver Age, Vehicle Age 1 2 3 4 5 6 7 8 Member Average Scotland, < 25, 0 1% 3% 1% 8% 4% 10% 4% 5% 5% Scotland, < 25, 1 2% 6% 2% 5% 5% 2% 7% 5% 4% Scotland, < 25, 2 2% 1% 5% 4% 3% 5% 24% 8% 7% Scotland, < 25, 3 2% 3% 2% 5% 5% 2% 4% 2% 3% Scotland, < 25, 4 2% 6% 2% 4% 1% 5% 9% 2% 4% Scotland, < 25, 5 2% 11% 0% 9% 2% 7% 3% 2% 4% Scotland, < 25, 6 3% 8% 1% 2% 7% 11% 7% 4% 5% Scotland, < 25, 7 1% 10% 8% 4% 2% 6% 1% 1% 4% Scotland, < 25, 8 2% 6% 14% 1% 3% 7% 4% 3% 5% Scotland, < 25, 9 0% 7% 10% 6% 1% 6% 1% 2% 4% Scotland, < 25, 10 0% 16% 11% 6% 1% 5% 4% 2% 6% Scotland, < 25, 11 11% 4% 4% 8% 12% 5% 5% 2% 6% Scotland, < 25, 12 23% 7% 6% 4% 20% 10% 8% 18% 12% Scotland, < 25, 13 17% 2% 22% 13% 14% 7% 4% 16% 12% Scotland, < 25, 14 19% 3% 4% 6% 15% 5% 11% 13% 10% Scotland, < 25, 15 13% 7% 8% 17% 5% 6% 5% 15% 10% Check 100% 100% 100% 100% 100% 100% 100% 100% 100% Once I have that I would apply the new average distribution for all clients to the average cost for each group of factors before adding it back up again to give me a new weight adjusted average cost. The question I'm trying to answer is; what would client X look like if they had the same distribution as the entire group of clients? There could be a better way to do this in PBI but still learning the ropes with only forums for help. Thanks in advance.1.1KViews0likes4Comments