Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
@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)))
@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])))
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |