Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Measure for sub-category total without double counting

Hi there,

 

I have a measure which should calculate the functionality total for all banks using the following data tables (extract). 

My measure function is as follows: 

Totaal van PowerBI.Functionalities count voor World segment =
CALCULATE(
    SUM('Bank-country values'[PowerBI.Functionalities count]),
    ALLEXCEPT('Bank-country values','Bank-country values'[World segment])
)
It currently double-counts banks that are active in multiple countries (such as CITI bank in the example). How can I set up my measure that it only calculates the sum for unique banks in one world segment? Banks can be active in multiple world segments. In this example the total of East Asia should be 449 instead of 911.
 
I have tried many things that I found on this forum. However, I have not been able to manage.
 
Many thanks in advance!

 

  • Anonymous , Try a measure like

    sumx(values(Table[Bank]), calculate(Max(Table[Functionalities Count])))

2 Replies

  • Anonymous , Try a measure like

    sumx(values(Table[Bank]), calculate(Max(Table[Functionalities Count])))

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks amichandak, solution works.  Could you explain to me where take the world segments into account in this formula?