Forum Discussion
Redistribute Values from Measure
Hi all,
I have a scenario where I´m missing the information about which competitor we have lost a deal.
I want to replace the missing data, with a simple distribution (see table below):
| Competitive Brand | Lost Deals | Distribution | New Competitive Brand |
| Blank | 15 | 0 | 0 |
| Comp1 | 3 | 0.6 | 9 |
| Comp2 | 1 | 0.2 | 3 |
| Comp3 | 1 | 0.2 | 3 |
- Competitive brand is a column in a exisitng table
- Lost Deals is a measure
Anybody knows how to create the columns "Distribution" and "New Competitive Brand"?
- Anonymous2 years ago
Hi Marko33 ,
Please try:
First, you need to calculate the total number of lost deals for known competitors excluding the "Blank" category.
Total Known Lost Deals = IF('Table'[Competitive Brand] <> "Blank", SUMX( FILTER('Table', 'Table'[Competitive Brand] <> "Blank"), 'Table'[Lost Deals] ), 0)The distribution is calculated based on each competitor is share of the total known lost deals.
Distribution = IF('Table'[Total Known Lost Deals] = 0, 0, DIVIDE( 'Table'[Lost Deals], [Total Known Lost Deals] ))Distribute the "Blank" lost deals according to Distribution.
New Competitive Brand = VAR a = CALCULATE(SUM('Table'[Lost Deals]),FILTER(ALL('Table'),'Table'[Competitive Brand] = "Blank")) RETURN [Distribution] * aThe final page effect is as follows:
If you have any further questions please feel free to contact me.
pbix file is attached.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
1 Reply
- AnonymousNot applicable
Hi Marko33 ,
Please try:
First, you need to calculate the total number of lost deals for known competitors excluding the "Blank" category.
Total Known Lost Deals = IF('Table'[Competitive Brand] <> "Blank", SUMX( FILTER('Table', 'Table'[Competitive Brand] <> "Blank"), 'Table'[Lost Deals] ), 0)The distribution is calculated based on each competitor is share of the total known lost deals.
Distribution = IF('Table'[Total Known Lost Deals] = 0, 0, DIVIDE( 'Table'[Lost Deals], [Total Known Lost Deals] ))Distribute the "Blank" lost deals according to Distribution.
New Competitive Brand = VAR a = CALCULATE(SUM('Table'[Lost Deals]),FILTER(ALL('Table'),'Table'[Competitive Brand] = "Blank")) RETURN [Distribution] * aThe final page effect is as follows:
If you have any further questions please feel free to contact me.
pbix file is attached.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!