Forum Discussion
Wrong Total line table
- 5 years ago
twister8889 Just change your measure to this:
Value = IF( HASONEVALUE([Product]), sum([Values]), SUMX(SUMMARIZE('Table',[Product],[Category],[Type],[Month],"Sum",SUM([Values]),[Sum]) )Sorry, posted the wrong thing earlier, I edited it.
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
First of all, thank you for your answer..
amitchandak I tried but doesn't work
PaulDBrownI hope the total values can be by Type, independent the number of lines of product and category, I would like the total values can be evaluated by Type, like when I do the selection of Product or Category. If I select at least one Product or Category, I will have two lines with Value equal 10, and the total is 10.
My Value DAX is Value = sum(Values)
Make sense?
Greg_Deckler I will try to understand, thank you
twister8889 Just change your measure to this:
Value =
IF(
HASONEVALUE([Product]),
sum([Values]),
SUMX(SUMMARIZE('Table',[Product],[Category],[Type],[Month],"Sum",SUM([Values]),[Sum])
)
Sorry, posted the wrong thing earlier, I edited it.
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907