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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
fridge81
New Member

Dynamic Column calculation based on Slicer Selection

HI,

 

I'm relatively new to PowerBI and have run into some trouble calculating a percentage in a way that the calculation updates depending on what filters are applied.  I have a scaled down example of what I'm trying to accomplish attached below.  My objective is to show market share per office, where market share is the sum of all revenues divided by the sum of all market sizes.  However, I want the calculation to update dynamically depending on what filters are applied in slicers to Industry Classification and Project Size.  Here is my raw data:

 

Sample DataSample DataSample Output with no filtersSample Output with no filtersSample Output with filters applied to Project Size (Medium) and Industry Classification (1 OR 3)Sample Output with filters applied to Project Size (Medium) and Industry Classification (1 OR 3)

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@fridge81

 

In this scenario, you already have Product Size (Small, Medium, Large) and Industry Classification (1,2,3) column in your table, you just need one Market Size column instead of splitting into multiple columns that one for each "combo". 

 

Just re-modeling your table to keep only on Market Size column. Since you need the Revenue and Market Size values take the filter, you should create measures for Revenue and Market Size for your calculation, and put measure instead of column into visual. 

 

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Employee
Employee

@fridge81

 

In this scenario, you already have Product Size (Small, Medium, Large) and Industry Classification (1,2,3) column in your table, you just need one Market Size column instead of splitting into multiple columns that one for each "combo". 

 

Just re-modeling your table to keep only on Market Size column. Since you need the Revenue and Market Size values take the filter, you should create measures for Revenue and Market Size for your calculation, and put measure instead of column into visual. 

 

Regards,

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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