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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
jiinson
Helper I
Helper I

Total Display

Hi,

 

I'm trying to work out getting total number in the table.

1-25-2017 11-42-25 AM.png

I wonder why total rows has 0 even though it's supposed to be 26536.40.

 

My measures are:

Act New Wins = IF(AND([CurrentPeriod]>0, OR([PriorPeriod] =0, [PriorPeriod] = BLANK())), [CurrentPeriod]-[PriorPeriod], 0)

 

CurrentPeriod = calculate(SUM(DM_Piece_Ord_Inv_WinFlag[Invoice_Amount_USD_PY]), datesinperiod(DM_Piece_Ord_Inv_WinFlag[GL Post Date],EOMONTH(DATE(YEAR([Selected]),MONTH([Selected]), 20),0), -2, YEAR))

 

PriorPeriod = CALCULATE(SUM(DM_Piece_Ord_Inv_WinFlag[Invoice_Amount_USD_PY]), DATESBETWEEN(DM_Piece_Ord_Inv_WinFlag[GL Post Date], DATE(YEAR([Selected])-2, MONTH([Selected]),1),EOMONTH(DATE(YEAR([Selected]), MONTH([Selected])-1, 20), 0)))

 

Thanks in advance!

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

This is not how it works. A total is not the addition of the rows in a visual.  A total is the same formula applied with a different set of filters. I can't  see what filters you have in your visual as you have cut them out.  What you need to do is look at your formulas and evaluate them in your head given the filter context. 

 

Read my article here to understand more http://exceleratorbi.com.au/sum-vs-sumx-in-dax/

 

also you would be well advised to read about best practice http://exceleratorbi.com.au/best-practices-power-pivot-power-query-power-bi/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@jiinson

 

As @MattAllington said, the Total row doesn't add up all rows of values for this measure together. It uses the entire set in this table visual as filter context to slice this measure, and get the result as "grand total". So this result depends on filter context. For understanding filter context and row context, please refer to article below:

 

Row Context and Filter Context in DAX

 

Regards,

MattAllington
Community Champion
Community Champion

This is not how it works. A total is not the addition of the rows in a visual.  A total is the same formula applied with a different set of filters. I can't  see what filters you have in your visual as you have cut them out.  What you need to do is look at your formulas and evaluate them in your head given the filter context. 

 

Read my article here to understand more http://exceleratorbi.com.au/sum-vs-sumx-in-dax/

 

also you would be well advised to read about best practice http://exceleratorbi.com.au/best-practices-power-pivot-power-query-power-bi/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors
Top Kudoed Authors