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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Map - Postal Code - Client Pattern Shift

Hi all, I am trying to find out if there is a way I could show a shift in client pattern. For instance, I have 5 offices, and we are planning to close an office; which office would client choose to travel based on previous postal code data. The sample postal code data looks similar to this (except there are more than 15,000 postal codes record for last year)

 

Capturetable.PNG

 

 

 

 

 

 

On Excel, I would do a percentage of row, and distribute client from Office that we are closing to other offices. Example, if I am closing Office 1, I would find the percentage of the other rows and see WHO gets the most client. But I am hoping to do this visually? Any idea to accomplish this task. I am just trying to see the change in client's pattern when office closes; which one of these OTHER offices the client would go to. Thanks

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

If i understand corrrectly, you may achieve below.

If 'Office 1' is colsed, for 'T0B2X0':

The value of 'Office 2'=1+58*(1/(1+32+7+9))
The value of 'Office 3'=32+58*(32/(1+32+7+9))
The value of 'Office 4'=7+58*(7/(1+32+7+9))
The value of 'Office 5'=9+58*(9/(1+32+7+9))

 

I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

a1.png

 

You may create a measure as below.

Result = 
var tab = 
CALCULATETABLE(
    DISTINCT('Table'[Office]),
    ALLSELECTED('Table')
)
var sumcolse = 
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        ALLEXCEPT('Table','Table'[Postal Code]),
        NOT([Office] in tab)
    )
)
var sumnotcolse = 
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        ALLEXCEPT('Table','Table'[Postal Code]),
        [Office] in tab
    )
)
return
SUM('Table'[Value])+sumcolse*
DIVIDE(
    SUM('Table'[Value]),
    sumnotcolse
)

 

Result(When 'Office 1' is not selected, other offices add values by the percentage):

a2.png

 

Best Regards

Allan

 

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

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

If i understand corrrectly, you may achieve below.

If 'Office 1' is colsed, for 'T0B2X0':

The value of 'Office 2'=1+58*(1/(1+32+7+9))
The value of 'Office 3'=32+58*(32/(1+32+7+9))
The value of 'Office 4'=7+58*(7/(1+32+7+9))
The value of 'Office 5'=9+58*(9/(1+32+7+9))

 

I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

a1.png

 

You may create a measure as below.

Result = 
var tab = 
CALCULATETABLE(
    DISTINCT('Table'[Office]),
    ALLSELECTED('Table')
)
var sumcolse = 
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        ALLEXCEPT('Table','Table'[Postal Code]),
        NOT([Office] in tab)
    )
)
var sumnotcolse = 
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        ALLEXCEPT('Table','Table'[Postal Code]),
        [Office] in tab
    )
)
return
SUM('Table'[Value])+sumcolse*
DIVIDE(
    SUM('Table'[Value]),
    sumnotcolse
)

 

Result(When 'Office 1' is not selected, other offices add values by the percentage):

a2.png

 

Best Regards

Allan

 

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

 

Anonymous
Not applicable

Thank you very much!! that works!!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.