Forum Discussion

friend11_6's avatar
friend11_6
New Member
1 year ago
Solved

How to group values

Hi, I have the data in the following table Employe ID Employee Name Employee per Record1 per Record 2 Record 2 - Record 1 123 John Max 123 John Max 1   -1 123 Max John 123 Ma...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi friend11_6,

     

    Thank you for reaching out to the Microsoft Fabric Forum Community.

     

    To group all variations of the same employee under a single classification, you should group by Employee ID only, not by the full Employee string.

     

    Try creating the table with the following DAX.

    SummaryTable =
    VAR BaseTable = 'EmployeeData'
    RETURN
    ADDCOLUMNS (BaseTable,
    "Group Label",SWITCH (TRUE(),
    BaseTable[Record 2 - Record 1] = 0, "Reconciled",
    ISBLANK(BaseTable[per Record1]), "Not in Record 1",
    ISBLANK(BaseTable[per Record2]), "Not in Record 2",
    "Other"))

     


    Thanks & Regards,
    Prasanna Kumar