Forum Discussion
Table visual total
- 5 years ago
Hi, Anonymous
You can try the following Measure.
max_original_data =
IF (
HASONEFILTER ( 'Table'[amount] ),
MAXA ( 'Table'[amount] ),
SUMX ( 'Table', 'Table'[amount] )
)
The Table visual will looks like this:
Best Regards,
Caiyun Zheng
If this post helps, then please consider Accept it as the solutions to help the other members find it more quickly.
Hi Anonymous ,
The total row in Power BI is not a sum of the values in a column, it is the measure/calculation in that column calculated with no filters on it, therefore it will just show the MAX of all the unfiltered data, rather than the sum of the MAX values.
In order to help you out more, I'll need you to provide the measure/calculation that you want summed, and a sample of your data in table format such as Excel, or an embedded table in your reply (not a picture). I presume your [amount] column is the one that contains the MAX calculation, so providing that calculation would be helpful.
Pete
- Anonymous5 years agoNot applicable
i need to show distinct rows as values in the table visual and also need total as sum of all the rows in the table visual grand total. it is same type of data iam using, different category item so sales amount column has same values since it belongs to same product.
- BA_Pete5 years agoSuper User
Hi Anonymous ,
I don't feel your reply above has provided the information required, so I've made some assumptions in order to get this fixed for you, because I'm nice like that 🙂
My assumption is as follows:
You want to display the maximum [amount] value for each [year] / [company] combination in the table rows, but you want the total bar so show the SUM of these MAX value rows.
My solution based on the above assumed requirements:
Use this measure:
_yourMaxSumMeasure = VAR maxTable = SUMMARIZE( yourTable, yourTable[year], yourTable[company], "Max Amount", MAX(yourTable[amount]) ) RETURN SUMX( maxTable, [Max Amount] )This gives me the following output based on slightly adjusted sample data:
Pete