Forum Discussion

huguest's avatar
huguest
Icon for Advocate II rankAdvocate II
9 years ago
Solved

Need help with weighting

Hello - I am sorry if something like this has been posted but I could not find a solution to something that I think should be simple (I am faily new to Power BI)...   I need to calculate some kind ...
  • v-yulgu-msft's avatar
    9 years ago

    Hi huguest,

     

    To add a weighting column, please try this DAX formula:

    Weighting =
    DIVIDE (
        1,
        CALCULATE (
            DISTINCTCOUNT ( Table1[Category] ),
            ALLEXCEPT ( Table1, Table1[ID] )
        )
    )

     

    If you want to create a measure that returns weighting values rather than calculated column, above formula still works.

     

    Best regards,
    Yuliana Gu