Forum Discussion
SUM from DAX
mantasp Right, so you have a working measure for the rows. What you need to do then is (easiest way) create a new measure that uses ISINSCOPE or HASONEVALUE. If you HASONEVALUE for a certain column then you are in a row and return your original measure. If you are not in a row (total) you then have to SUMMARIZE your data exactly as it appears in your table with your measure tacked on as a calculation and then you do a SUMX across that.
Can't be more specific because you haven't provided sample data, what your tables and columns are called and all that.
And, if you find this incredibly frustrating, then vote for the idea I have linked in my signature.
4 Replies
- Greg_Deckler
Community Champion
mantasp 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 - mantaspFrequent Visitor
Greg_Deckler thanks for your replay and for your websites.
First I have to find value by latest time and then sum it.
1 ID have 1-5 rows with price and I need use only latest by date. My code is working, but when I want to sum it I can't
- Greg_Deckler
Community Champion
mantasp Right, so you have a working measure for the rows. What you need to do then is (easiest way) create a new measure that uses ISINSCOPE or HASONEVALUE. If you HASONEVALUE for a certain column then you are in a row and return your original measure. If you are not in a row (total) you then have to SUMMARIZE your data exactly as it appears in your table with your measure tacked on as a calculation and then you do a SUMX across that.
Can't be more specific because you haven't provided sample data, what your tables and columns are called and all that.
And, if you find this incredibly frustrating, then vote for the idea I have linked in my signature.
- mantaspFrequent Visitor
Thank you, Greg Deckler