Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Formatting rows by grouping

In short, I have a list of unsorted rows. I would like to group them by category (disposable mens, womens systems, etc) and then seperate them by their unique category in their rows, similar to the excel sheet picture below. 

I know their is a dax search function to organize them into categories, but I do not know how to place the rows together under the main blue title

 

All help appreciated

 

  • Syk's avatar
    Syk
    4 years ago

    You can create a conditional column to look for your categories in the other column (this is dummy data)

     

     

    Then use the matrix visual to achieve what you need (put category and stuff in the rows)

     

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous ,

    I created some data:

    Here are the steps you can follow:

    1. Create calculated table.

    Table 2 =
    var _sum=
    SUMMARIZE(
        'Table',
        "MANUAL SHAVE","A",
        "Sales",CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),CONTAINSSTRING('Table'[MANUAL SHAVE],"A"))))
    return
    UNION('Table',_sum)

    Table 3 =
    var _sum=
    SUMMARIZE(
        'Table',
        "MANUAL SHAVE","B",
        "Sales",CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),CONTAINSSTRING('Table'[MANUAL SHAVE],"B"))))
    return
    UNION('Table 2',_sum)

    2. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

4 Replies

  • Syk's avatar
    Syk
    Resident Rockstar

    You can use a matrix visual to achieve the second part. There are a number of ways to categorize them although if I were you, I'd probably do it in PowerQuery instead of DAX.

    • Anonymous's avatar
      Anonymous
      Not applicable

      why power query because using the group by does not include the dax search and i need to look for key words to group them in the categories

       

      also for the matrix visual is still do not know what you mean how can i group them

      • Syk's avatar
        Syk
        Resident Rockstar

        You can create a conditional column to look for your categories in the other column (this is dummy data)

         

         

        Then use the matrix visual to achieve what you need (put category and stuff in the rows)

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

    I created some data:

    Here are the steps you can follow:

    1. Create calculated table.

    Table 2 =
    var _sum=
    SUMMARIZE(
        'Table',
        "MANUAL SHAVE","A",
        "Sales",CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),CONTAINSSTRING('Table'[MANUAL SHAVE],"A"))))
    return
    UNION('Table',_sum)

    Table 3 =
    var _sum=
    SUMMARIZE(
        'Table',
        "MANUAL SHAVE","B",
        "Sales",CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),CONTAINSSTRING('Table'[MANUAL SHAVE],"B"))))
    return
    UNION('Table 2',_sum)

    2. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly