Forum Discussion

ChiaraFru's avatar
ChiaraFru
Regular Visitor
3 years ago
Solved

How to sum by category?

Dear all,

 

I try to explain my self better I can.

I have HR list, I know which people are based in which country and are taking care of cases in particular markets.

I have a table with the amounts of cases logget in markets.

With a calculated measure, I have the number of cases per market and how many people are working on the cases in those markets.

My issue is whan I have a person that works in more than one markets, i need to sum the ratio cases/headcounts for eache markets where he works. how to do it?

 

Thanks

  • Hi,

    I am not sure how your data model looks like, but please try something like below.

     

    expected result measure: =
    SUMX (
        DISTINCT ( 'TableName'[Market] ),
        DIVIDE ( [Cases measure], [HeadCount measure] )
    )
    

2 Replies

  • Hi,

    I am not sure how your data model looks like, but please try something like below.

     

    expected result measure: =
    SUMX (
        DISTINCT ( 'TableName'[Market] ),
        DIVIDE ( [Cases measure], [HeadCount measure] )
    )