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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Month-by-Month calculated column

Hi Guys, I created a calculated column which calculates the SoM, its formulae is:

SoM = Sheet1[Mio Sales]/ SUM(Sheet1[Mio Sales])

 

The thing is, I need the SoM to be calculated on a month-by-month basis, however, what is happening is that it’s calculating the sales over the total sum of all months not per month. (Even though I have a column for months and put a slicer)

 

For example: In Jan: Company X has 20 sales from 50 total sales.

In Feb: Company X has 50 sales from 80 total sales.

 

SoM for Jan is supposed to be 20/50, however, in my case it is being 20/130.

 

Is there a way to apply a monthly filter on the equation?

 

Please advise on what to do.

 

Thank you!

Best,

Mays

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous  , Base on the  usages

SoM = divide(calculate(sum(Sheet1[Mio Sales]),filter(Sheet1,Sheet1[company]="X")), SUM(Sheet1[Mio Sales]))

or

SoM = divide(SUM(Sheet1[Mio Sales]),calculate(sum(Sheet1[Mio Sales]),all(Sheet1)))

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
ryan_mayu
Super User
Super User

@Anonymous 

 

Since you didn't provide the sample data,hope this is helpful.

 

% = 'Table'[sales]/CALCULATE(SUM('Table'[sales]),FILTER('Table','Table'[month]=EARLIER('Table'[month])))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hi @ryan_mayu

 

thank you so much it worked 😄 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors