Forum Discussion

Hash2023's avatar
Hash2023
Frequent Visitor
2 years ago
Solved

Help on DAX statement

Hello Team,

 

I have the below table:

Client CodePAX
10102
20203
10102
10102
30304

 

I need your help with a DAX formula to calculate the Total Pax but it has to take into account the unique client code.

 

From the table: My result should be 9 PAX (1010 = 2 + 2020 = 3 and 3030 = 4)

 

Thank you for your help.

 

Kind Regards,

 

Hash

  • Hi Hash2023 ,

     

    Try the following code:

    Total PAX = SUMX(SUMMARIZE(Table, Table[Client], Table[CodePAX]), Table[CodePAX])

     

    I'm assuming based on your sample that the CodePAX is always the same for the sames client.

2 Replies

  • Hi Hash2023 ,

     

    Try the following code:

    Total PAX = SUMX(SUMMARIZE(Table, Table[Client], Table[CodePAX]), Table[CodePAX])

     

    I'm assuming based on your sample that the CodePAX is always the same for the sames client.

    • Hash2023's avatar
      Hash2023
      Frequent Visitor

      Hi Miguel,

       

      Thank you for your help. It works.

       

      Kind Regards,