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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jeremiels
Frequent Visitor

Dynamic Column calculation

Hello,

 

I want to add a column in my database who sums the total revenue for each line of business.

 

Region           Entity               Turnover

A                    1                        10K

A                    2                          5K

B                    3                         15K

B                    4                           5K

 

So I want to create a column (region turnover) whose result should be:

 

Region           Entity               Turnover            Region turnover

A                    1                        10K                          15K

A                    2                          5K                          15K

B                    3                         15K                         20K

B                    4                           5K                         20K

 

However I don't know how to determine a dynamic filter per region so the result of my formula is

Region           Entity               Turnover            Region turnover

A                    1                        10K                          35K

A                    2                          5K                          35K

B                    3                         15K                         35K

B                    4                           5K                         35K

 

Can you help me?

 

Many thanks,

Jérémie

1 ACCEPTED SOLUTION
v-caliao-msft
Microsoft Employee
Microsoft Employee

@jeremiels,

 

Please use the DAX below to achieve your requirement.

RegionTurnover = CALCULATE(SUM(Table1[Turnover]),ALLEXCEPT(Table1,Table1[Region]))

Capture.PNG

 

ALLEXCEPT removes all context filters in the table except filters that have been applied to the specified columns.
https://msdn.microsoft.com/en-us/library/ee634795.aspx

 

Regards,

Charlie Liao

View solution in original post

1 REPLY 1
v-caliao-msft
Microsoft Employee
Microsoft Employee

@jeremiels,

 

Please use the DAX below to achieve your requirement.

RegionTurnover = CALCULATE(SUM(Table1[Turnover]),ALLEXCEPT(Table1,Table1[Region]))

Capture.PNG

 

ALLEXCEPT removes all context filters in the table except filters that have been applied to the specified columns.
https://msdn.microsoft.com/en-us/library/ee634795.aspx

 

Regards,

Charlie Liao

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.