Forum Discussion
Groupeby two columns
- Anonymous3 years ago
Hi Anonymous ,
Please try:Table 2 = SUMMARIZE ( 'Table', 'Table'[Month], 'Table'[week], "Total Sales", SUM ( 'Table'[Sales] ) )For the [Month] column, you can create calculated columns like:
Month 2 = FORMAT('Table'[Date],"mmm"&"."&"-"&"yy")The PBIX file is attached for reference.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Anonymous ,
Create a new Table using the following:
Table2 = SUMMARIZECOLUMNS( Table1[Month], Table1[Week],
"TotalSales", SUM(Table1[Sales] ))
This should get you what you asked for.
Regards,
- Anonymous3 years agoNot applicable
Hi rsbin , thanks for you response
But that is not what I am asking.
the result of your proposition gives this
I am asking the sum of sales per week whith keeping the "Month" column.
- Anonymous3 years agoNot applicable
Hi Anonymous ,
Please try:Table 2 = SUMMARIZE ( 'Table', 'Table'[Month], 'Table'[week], "Total Sales", SUM ( 'Table'[Sales] ) )For the [Month] column, you can create calculated columns like:
Month 2 = FORMAT('Table'[Date],"mmm"&"."&"-"&"yy")The PBIX file is attached for reference.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data