Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Groupeby two columns

Dears,   I have a table where I insert the sales per week (table 1), I want to create a new table from this table to group the sales per week while keeping the month column (table 2)
  • Anonymous's avatar
    Anonymous
    3 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 Team

     

    If 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