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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

DAX measure

Hi everyone! could you please help me with the scenario below. Appreciated your help on this in advance.

 

I have territories sales data. There are territories where 2 or 3 managers are responsible at the same time.

I need to calculate sales for each manager but if one of these territories has multiple managers I need to divide sales on this territory by amount of managers.

 

Once again, great thanks!

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You can try this expression to get the result:

Measure =
SUMX (
    SUMMARIZE (
        'Table',
        [Territories],
        [Terr_count],
        "sales", SUM ( 'Table'[Sales] ) / [Terr_count]
    ),
    [sales]
)

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , You can divide by distinctcount(Table[Manager])

 

or calculate(distinctcount(Table[Manager]), allexcept(Table, Table[territories]))

 


Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Great thanks for your help! Sure! It's just an example. I' ve put column Terr_count, to understand how often do we meet this territory.

 

Terr_countTerritoriesManagerSales
3Западный округРайков Олег45733
3Карасунский округРайков Олег163207
3Прикубанский округРайков Олег100224
3Центральный округРайков Олег127229
3Западный округПлохая Елена188585
3Карасунский округПлохая Елена24962
3Прикубанский округПлохая Елена70243
3Центральный округПлохая Елена84036
3Западный округДудзенко Виталий31748
3Карасунский округДудзенко Виталий120382
3Прикубанский округДудзенко Виталий188838
3Центральный округДудзенко Виталий25871
1ДинскаяДудзенко Виталий165085
1Восточный районДудзенко Виталий109245
1Приморский районДудзенко Виталий51807
1Центральный районДудзенко Виталий184341
1БелореченскПлохая Елена187547
1ПолтавскаяПлохая Елена70056
1Славянск-на-КубаниПлохая Елена89100
1МайкопПлохая Елена40496
1ЭстосадокРайков Олег8153
1ДагомысРайков Олег148516
1ЛазаревскоеРайков Олег11920
1СочиРайков Олег154375

Hi @Anonymous ,

 

You can try this expression to get the result:

Measure =
SUMX (
    SUMMARIZE (
        'Table',
        [Territories],
        [Terr_count],
        "sales", SUM ( 'Table'[Sales] ) / [Terr_count]
    ),
    [sales]
)

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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