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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Creating a measure to divide a column by a measure

Hi All,

 

I have created a measure that allows me to see the total sales for all stores that have a rate that is not blank.  This report will be focused on a region, so a slicer will decide which region will be showing.  Now, I would like to divide the stores that are not blank's total sales by the total for the region.  This will leave me with a percent of the of the sales that are reporting rates for each store that is reporting a rate.

 

Here's my first measure to get the total sales of stores that do not have a blank rate: 

Weighted Total = (CALCULATE(SUM('Main'[Total Sales]),FILTER(Main,VALUE('Main'[Total Rate])<> BLANK())))
 
StoreTotal SalesTotal RateRegion

A

100.021
B150.041
C125.021
D50-1
E100-1
F200.072
G110.012
H60-2
I75.052
 
 In the sample data, my first measure would exclude stores D & E for Region 1, and the total sales would be 375.  I would then want to add a column to this table that would divide the store's total sales (if they reported a rate) by the regional total.  For example, it would do the 100/375 calculation for Store A and leave me with 27%. in another column in the table.
 
Thanks in advance
2 REPLIES 2
AlexisOlson
Super User
Super User

Just to be clear, you cannot use slicer selections in a calculated column. Calculated columns and calculated tables cannot be responsive to slicers since they are only computed once per data load.

Anonymous
Not applicable

I think I misspoke a bit in the last paragraph.  I'm not looking for a calculated column, but rather using a table visual to display this data.  I would want to add that measure as a field in my table visual.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.