Forum Discussion

mdbuzzer's avatar
mdbuzzer
Icon for Helper I rankHelper I
5 years ago
Solved

How do I write a DAX to create a custom column for duplicate values?

Below is the DAX to get the total count of rows of an organisation when the distinct count of sector is greater than 1, meaning it counts the organisation when it has been with multiple sectors.   ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi mdbuzzer ,

    You could use the following formula to create a column :

    Duplicate Organisation =
    IF (
        CALCULATE (
            DISTINCTCOUNT ( Table1[Sector] ),
            ALLEXCEPT ( Table1, Table1[Organization] )
        ) > 1,
        1,
        0
    )

    My visualization looks like this:

    Did I answer your question ? Please mark my reply as solution. Thank you very much.

    If not, please upload some insensitive data samples and expected output.

     

    Best Regards,

    Eyelyn Qin