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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.