Forum Discussion

anamika_singh's avatar
anamika_singh
Frequent Visitor
1 year ago
Solved

Summarizing a Matrix visual by a specific field

Hi Team,

 

Can i get help on the below:

The below is a matrix visual created based on my dataset:

 

      
      
NameHas AccessDaily LoginsProfiles ViewedResponse RateAssigned Date
Abhishek AYes1010050%4/25/2025
Amrita BYes2015052%4/25/2025
KarolNo302050% 
Ana PNo3020054% 
Ana PYes4030054%3/2/2025
CarlaYes502058%4/25/2025
EmilyYes6030053%4/10/2024
EmilyNo7050100%2/10/2023

 

Can we convert this to something like this using DAX?  Group the above matrix by Name column and pick assigned date as the latest date.

RecruiterHas AccessDaily LoginsProfiles ViewedResponse RateAssigned Date
Abhishek AYes1010050%4/25/2025
Amrita BYes2015052%4/25/2025
KarolNo302050% 
Ana PYes7050054%3/2/2025
CarlaYes502058%4/25/2025
EmilyYes13035077%4/10/2024

 

 

Thank you,

Anamika

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hello anamika_singh ,

     

    Thank you for reaching out to Microsoft Fabric Community Forum

     

    Ashish_Mathur lbendlin Thank you for your quick responses.

     

    Please try the below DAX measure to create a calculated table.

     

    finalresult =
    VAR BaseTable =
        ADDCOLUMNS(
            YourTable,
            "Latest Assigned Date",
                CALCULATE(
                    MAX(YourTable[Assigned Date]),
                    ALLEXCEPT(YourTable, YourTable[Name])
                )
        )
    RETURN
    SUMMARIZE(
        BaseTable,
        YourTable[Name],
        "Has Access",
            VAR _LatestDate = MAXX(FILTER(BaseTable, YourTable[Name] = EARLIER(YourTable[Name])), [Latest Assigned Date])
            RETURN
                CALCULATE(
                    MAX(YourTable[Has Access]),
                    YourTable[Assigned Date] = _LatestDate
                ),
        "Daily Logins", SUM(YourTable[Daily Logins]),
        "Profiles Viewed", SUM(YourTable[Profiles Viewed]),
        "Response Rate", AVERAGE(YourTable[Response Rate]),
        "Assigned Date", MAX(YourTable[Assigned Date])
    )

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!

    Regards,

    B Manikanteswara Reddy

10 Replies

  • yes, you can do that directly in your table visual (it's not a matrix, unless you use explicit measures?).  Set the last column to aggregate to "Latest". And probably the Response Rate to Average rather than sum.

  • Hi,

    Share the raw data.  Share data in a format that can be pasted in an MS Excel file.

    • anamika_singh's avatar
      anamika_singh
      Frequent Visitor

      Hi Ashish,

       

      I think the data I shared can be pasted in excel, please let me know if that's not the case:)

       

      Thanks,

      Anamika

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        What you have shared is the result of a matrix visual, not the raw data from where you created it.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello anamika_singh ,

     

    Thank you for reaching out to Microsoft Fabric Community Forum

     

    Ashish_Mathur lbendlin Thank you for your quick responses.

     

    Please try the below DAX measure to create a calculated table.

     

    finalresult =
    VAR BaseTable =
        ADDCOLUMNS(
            YourTable,
            "Latest Assigned Date",
                CALCULATE(
                    MAX(YourTable[Assigned Date]),
                    ALLEXCEPT(YourTable, YourTable[Name])
                )
        )
    RETURN
    SUMMARIZE(
        BaseTable,
        YourTable[Name],
        "Has Access",
            VAR _LatestDate = MAXX(FILTER(BaseTable, YourTable[Name] = EARLIER(YourTable[Name])), [Latest Assigned Date])
            RETURN
                CALCULATE(
                    MAX(YourTable[Has Access]),
                    YourTable[Assigned Date] = _LatestDate
                ),
        "Daily Logins", SUM(YourTable[Daily Logins]),
        "Profiles Viewed", SUM(YourTable[Profiles Viewed]),
        "Response Rate", AVERAGE(YourTable[Response Rate]),
        "Assigned Date", MAX(YourTable[Assigned Date])
    )

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!

    Regards,

    B Manikanteswara Reddy

    • anamika_singh's avatar
      anamika_singh
      Frequent Visitor

      Thank you 

      v-bmanikante
      Preview
       
       
      Thank you so much, your suggestion did help me to create the table. However, the data in the table is an  aggregated one. The other requirement  i have is that, this table sits within a report which has few slicers and the data in the table should change based on the slicer selections. I was hoping to get something created which was interactive as well. Let me know if that's possible.
      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi anamika_singh ,

         

        If you want to filter data using a slicer, that’s absolutely possible.
        However, if you're using a column from a newly created table as a slicer (instead of directly from your main table), you'll need to create a relationship between the new table and your original table for the slicer to work properly.

        Alternatively, you can consider using field parameters, which give you more flexibility to switch between different fields dynamically in your visuals.

         

        If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!

        Regards,

        B Manikanteswara Reddy