Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I'm trying to work out getting total number in the table.
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!
Solved! Go to 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/
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/
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 34 | |
| 33 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 61 | |
| 60 | |
| 39 | |
| 26 | |
| 24 |