Forum Discussion
How to group values
- Anonymous1 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
Hi,
Must the values be in measures before the proposed solution could work? I had previously tried the following:
Classification =
SWITCH(TRUE(),
'Record 2 - Record 1 < 0, "Not found in Record 2",
'Record 2 - Record 1 = 0, "Reconciled",
"Not found in Record 1")
With Record 2 - Record 1 created as a Measure.
However, in doing so, there was no record displayed under "Reconciled"
I am not sure if I'd written my Measure incorrectly?
- Shravan1331 year agoSuper User
Not necessary. Try it with your existing columns.
- friend11_61 year agoNew Member
Hi,
I get the same outcome by applying your proposed solution. I wonder if this is because the Employee cannot be grouped under the same classification given that the order of the name could be different? I don't know how to overcome this problem ...