Forum Discussion
Summarise data from a different table
Hi All
It must be Monday because my brain doesnt work!
So here is the problem.........
I want to sum a value from another table (table 1 below) to give me a total (in New Table) like this;
Table1
| Name | Hours |
| Dave | 40 |
| Ted | 40 |
| Gary | 40 |
| Gary | 30 |
| Ted | 50 |
New Table
| Name | Total Hours |
| Dave | 40 |
| Ted | 90 |
| Gary | 70 |
How?!?!?! Its driving me mad.
Anonymous not sure you are looking to create a new table in the model or use table visual,
for table visual, just drop the name and total hours on value section and if total hours is a number column, it will sum, if not then just click the arrow next to total hours, change the aggregation to sum
if you want to create a new table, use following DAX expression
New Table = SUMMAARIZE ( Table, Table[Name), "Total Hours", SUM( Table[Total Hours] ) )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
3 Replies
- parry2kSuper User
Anonymous not sure you are looking to create a new table in the model or use table visual,
for table visual, just drop the name and total hours on value section and if total hours is a number column, it will sum, if not then just click the arrow next to total hours, change the aggregation to sum
if you want to create a new table, use following DAX expression
New Table = SUMMAARIZE ( Table, Table[Name), "Total Hours", SUM( Table[Total Hours] ) )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
- AnonymousNot applicable
ah thanks! Yeah I've been a bit silly there havent I? It must have been a Monday thing!!
Thanks for your help!
- v-eachen-msftCommunity Support
Hi Anonymous ,
You could use "Group By" feature to get total values in query editor.
Here is the result.