Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
DataIsLife
New Member

Challenging Task - redistribution of Sales values

Hi Everyone,

 

This is a tough one I cannot manage to solve, so I'll try to explain short and sweet and thanks for any input in advance.

 

In short, I'm trying to redistribute the company sales (internal) values between 3 subgroups, based on how a customer locally distributed the purchased goods. The problem is that there is no direct relationship, since the customer uses internal references and some of them is not even an existing account in the internal system. This is 1 customer group, and there are other customers as well.

 

The redistribution should happen on month and subgroup level, which means on row level I get a % from the division of sales value and the total of the sales for that group in the given month (calculate(sum(sales),filter(subgroup = earlier(subgroup),filter(month = earlier(month))). 

 

Then this % should split the sales from the internal sales table (that is also on a subgroup and month level), so for example, if customer X in subgroup 1 had 2% (external) in 2018 JAN then I'd like to multiply (internal) Y sales value of subgroup 1 in 2018 JAN by 0.02

 

external performance (based on external sales) for account X by subgroup by month = 2%

internal performance by subgroup by month = 1000

required value = 1000 * 0.02 = 20

 

Below are some related snapshots and I can also share a sample PBIX file, if needed. The live data is also arranged like this, apart from 1 difference - customer sales is filtered by the date table, the relationship is not bi-directional.

 

So I'm a bit stuck with this. I managed to get the % values (by month by  subgroup), but I'm not sure how could I split up the internal sales values using the percentages, as there is no direct relationship.

 

I really appreciate any help and thanks for reading.

 

DM.JPGCol1.JPGCol2.JPGCol3.JPGCol4.JPG

1 REPLY 1
v-danhe-msft
Employee
Employee

Hi @DataIsLife ,

From your description, I want to know how could you get the 2%:

external performance (based on external sales) for account X by subgroup by month = 2%

And where could you want to show your desired result? In a table or a measure by filter?

Please offer your pbix that I could test for you and post your desired result if possible?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.