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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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

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.

View solution in original post

2 REPLIES 2
v-sihou-msft
Employee
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,

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.