Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Hash2023
Frequent Visitor

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

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

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.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

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.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Hi Miguel,

 

Thank you for your help. It works.

 

Kind Regards,

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.