Forum Discussion
mantasp
3 years agoFrequent Visitor
SUM from DAX
Hello, I have this code to get value by max date in rows. My problem: how can i sum all of this values? Code: sales_latest = Var Max_date = MAX(FuelHistory[EventTime]) var ...
- 3 years ago
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.
mantasp
3 years agoFrequent Visitor
Thank you, Greg Deckler