Forum Discussion

vicky1610's avatar
vicky1610
Frequent Visitor
2 years ago

How to avoid aggregation of categorical data in Matrix Visual?

Hello Folks,

I have a data which looks like

 

CategoryTypeUsernameDateCommentsShareLikes
mem1type1abc2024-02-12100
mem1type1mno2024-01-31010
mem1type1mno2024-01-31010
mem2type1def2024-02-12102
mem2type2ghi2024-02-12010
mem2type2pqr2024-01-31010
mem2type3stu2024-02-08001

 

I want to display it in Matrix visual so that it looks like the below and on expanding (clicking ðŸ”½ ) it should show rows like table as above with all relative information for that category.

CategoryTypeUsernameDateCommentsShareLikes
mem1 (3)      🔽   120
mem2 (4)      🔽   123
Total   243

 

I tried it using matrix visual, but I am facing issue that for any column which is not number, matrix visual takes either first value or count etc. and there is no way to restrict it. Please See below snapshots

 

 

Can someone help me with this?

Thank You!!!

 

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,vicky1610 
    I am glad to help you.

    Hello, you can use Unpivot to change the data after using the matrix to complete the target effect

    Here are my test results for your reference

    This is your existing data

     

    You will need to move your data:

    Select both the [Category] column and the [Date] column, and Unpivot the selection to the other columns

    like this.



    Here is the result

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

    Best Regards,

    Carson Jian,

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

    • vicky1610's avatar
      vicky1610
      Frequent Visitor

      Hi Anonymous 

      Thank you for the response!

       

      The approach you provided does not leads me to what I am trying to achieve.

      I want the matrix to be look like this,

      CategoryTypeUsernameDateCommentsShareLikes
      mem1 (3)         120
      mem2 (4)         123
      Total   243

       

      and the default selection of First/Last/Count etc. in column options for values is stopping me to achieve this.

      Is there any way by which I can take direct value from source as it is or any measure can help?

      • Anonymous's avatar
        Anonymous
        Not applicable

        vicky1610 
        Unfortunately,if you want to put fields into values fields in the matrix, the data in this field is aggregated by default (as with measure) to show a scalar value, so if you don't want to use the default Values aggregation effect in the matrix, I recommend that you manually create your own measures as needed. However, for non-numeric fields, there are fewer aggregation functions available (max,min, etc).

        I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

        Best Regards,

        Carson Jian,

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