Forum Discussion

simscj2694's avatar
simscj2694
New Member
1 year ago
Solved

Create Measure for Unique values in a column

Hi all,

I am have an excel sheet of data that contains a column for performing personnel. I am looking for a measure that will display the personnel name as well as count how many times its repeated in the column. Id like for the end results to say Ashley - 2, Bob - 2, Carl 1.

Ashley
Bob
Carl
Bob
Ashley
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi simscj2694 ,
    Thank you for reaching out to Microsoft Fabric community.
    Try the below Measure
    Load the sheet that contains the column Person.

    Measure =
    CONCATENATEX(
    VALUES('Table'[Person]),
    'Table'[Person] & " - " & CALCULATE(COUNTROWS('Table')),
    ", "
    )

    Regards,
    Sreeteja

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    simscj2694 Try:

    Measure = 
        VAR __Names = SELECTCOLUMNS( DISTINCT( 'Names'[Name] ), "value", [Name] )
        VAR __Table = ADDCOLUMNS( __Names, "Count", COUNTROWS( FILTER( 'Names', [Name] = [value] ) ) )
        VAR __Result = CONCATENATEX( __Table, [value] & " - " & [Count], ", " )
    RETURN
        __Result
  • Hi,

    To a matrix visual, drag Name and this measure

    Count = countrows(Data)

    Hope this helps.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi simscj2694 ,
    Thank you for reaching out to Microsoft Fabric community.
    Try the below Measure
    Load the sheet that contains the column Person.

    Measure =
    CONCATENATEX(
    VALUES('Table'[Person]),
    'Table'[Person] & " - " & CALCULATE(COUNTROWS('Table')),
    ", "
    )

    Regards,
    Sreeteja

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi simscj2694 ,

      I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi simscj2694 ,

        I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you