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

View all the Fabric Data Days sessions on demand. View schedule

Reply
pro_x
Helper I
Helper I

Total sum of a column

Hi,

 

How do i get the total Sales for each row. I used this measure 

Total Sales = CALCULATE([Sales],ALL('Table'))

and it gives me the total of one row (Sales) and it puts it across all rows

I want to get the total of a column per row per month

Total Sales.PNG

2 REPLIES 2
AntrikshSharma
Super User
Super User

Try something like this:

Column 2 =
VAR SalesMonth =
    MONTH ( Sales[Order Date] )
VAR Result =
    CALCULATE (
        [Total Sales],
        FILTER ( Dates, Dates[Month Number] = SalesMonth ),
        ALL ( Sales )
    )
RETURN
    Result

The below image is from my sales table which has one to many relationship with dates. you can see that all the rows that are for same month have the same value.

11.PNG22.PNG

the amount in the above 2 pictures can be verified by the below one. by using a measure like 

Total Sales = SUMX ( Sales, Sales[Quantity] * Sales[Net Price] )

33.PNG

mwaltercpa
Advocate III
Advocate III

I'd need more to understand what you mean by total sales per row. It appears you already have a sales column on the left of your measure. I can tell you that using ALL() is going to remove the filters, and that is why you are getting the grand total on every row. ALL is ignoring the filters on that table, and for each cell is repeating the act of summing all the dollars available in the column. 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.