Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello, Pundits!
I have one column with dates, one column with five distinct names (multiple rows of each name, though) and another column with the respective sales made for that particular name and date (again multiple rows). Basically, a day-by-day sales tracker made in Excel.
There are supposed to be just three salespersons on record, for billing purposes, though there is no limit on the number of people who can make sales over telephone.
What Im trying to do, is:
1. filter the sales for the three official salespersons into one column
2. filter the sales for the other two into another column
3. somehow distribute, evenly, the sales for the two unofficial salespersons, across the official three.
Ive been wrangling with sumx(filter combinations for a while now, and am reaching nowhere.
Searching across here and Google didnt really help, either, I understand the basics okay, i think, but maybe I'm dumber than I think I am.
Would appreciate any help anyone would be kind enough to send my way.
the closest I've come to getting anywhere is the below:
Solved! Go to Solution.
Hi,
I have something for you which assumes this data model:
So you have a list of offical reps and unoffical reps.
When you drag in the list of offical reps, the sales of the unoffical reps will be equally added:
This works by using the characteristic that some sales is blank, which is the sales of the unoffical reps. its broken down into pieces here.:
NoOfficialRepSales = CALCULATE(SUM(Sales[Sales Amount]);ISBLANK('Official Rep'[Rep]))
NumberOfOfficalSalesReps = CALCULATE(COUNTX('Official Rep';SUM(Sales[Sales Amount])); ALLSELECTED('Official Rep'[Rep]))
AdditionalDistributedUnOfficialSales = DIVIDE([NoOfficialRepSales];[NumberOfOfficalSalesReps])
TotalSales =
IF (
HASONEVALUE ( 'Official Rep'[Rep] );
IF (
NOT ( ISBLANK ( SELECTEDVALUE ( Sales[Rep] ) ) );
SUM ( Sales[Sales Amount] ) + [AdditionalDistributedUnOfficialSales];
BLANK ()
);
SUMX (
ALLSELECTED ( 'Official Rep'[Rep] );
CALCULATE ( SUM ( Sales[Sales Amount] ) )
)
)
Link to file here.
Hope it works for you, if so, pls mark as solution. Thumbs up for the effort is appreciated.
Kind regards, Steve.
p.s.
NumberOfOfficalSalesReps should be labeled: NumberOfUNOffialSalesRepsales
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
Hi,
I have something for you which assumes this data model:
So you have a list of offical reps and unoffical reps.
When you drag in the list of offical reps, the sales of the unoffical reps will be equally added:
This works by using the characteristic that some sales is blank, which is the sales of the unoffical reps. its broken down into pieces here.:
NoOfficialRepSales = CALCULATE(SUM(Sales[Sales Amount]);ISBLANK('Official Rep'[Rep]))
NumberOfOfficalSalesReps = CALCULATE(COUNTX('Official Rep';SUM(Sales[Sales Amount])); ALLSELECTED('Official Rep'[Rep]))
AdditionalDistributedUnOfficialSales = DIVIDE([NoOfficialRepSales];[NumberOfOfficalSalesReps])
TotalSales =
IF (
HASONEVALUE ( 'Official Rep'[Rep] );
IF (
NOT ( ISBLANK ( SELECTEDVALUE ( Sales[Rep] ) ) );
SUM ( Sales[Sales Amount] ) + [AdditionalDistributedUnOfficialSales];
BLANK ()
);
SUMX (
ALLSELECTED ( 'Official Rep'[Rep] );
CALCULATE ( SUM ( Sales[Sales Amount] ) )
)
)
Link to file here.
Hope it works for you, if so, pls mark as solution. Thumbs up for the effort is appreciated.
Kind regards, Steve.
p.s.
NumberOfOfficalSalesReps should be labeled: NumberOfUNOffialSalesRepsales
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
Hi Steve,
That worked a CHARM! Exactly what I had in mind, while wrangling with the problem.
Had the separate tables, couldn't quite get them to play together.
Your post just makes everything so very clear and simple.
Thank you, Sir!
Happy to read and glad to be of help!
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi Allison,
Thank you, that works. ALL helps with the remaining sales, too.
I did plug this in, and get the results I wanted, yet have decided to use Steve's solution as it is something new for me to learn and add to the knowledge base.
Wonderful community, this, always amazing people helping out. I'm in awe.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
13 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
14 | |
12 | |
11 |