Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Need help in DAX Measure

Experts, I need your help to fix the DAX formula. The below measure should sum up all the values as denominator in the measure. Actually, I am not able to sum those values as Link ID column datatype ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous,

    I'd like to suggest you add a variable with summarize function to aggregate these ID at first, then you can simply summary these results to calculate with current id:

    % Link ID =
    VAR summary =
        SUMMARIZE (
            ALLSELECTED ( 'Query 1' ),
            [Category],
            "DC LID", DISTINCTCOUNT ( 'Query 1'[Link ID] )
        )
    RETURN
        DISTINCTCOUNT ( 'Query 1'[Link ID] ) / SUMX ( summary, [DC LID] )

    Regards,

    Xiaoxin Sheng