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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

how to get distinct values of a column based on another column

Hi Everyone,

 

Hope everyone is safe.

 

I need help with developing a dax fomula that will allow me to get distinct total complaints value based on Month_Year. Following is how the data sits in the table;

 

This dax calculation will then be used to get calculate (Cases / total complaints) *100%

 

Month_YearIssue GroupsKeywordsCasesTotal complaints
1/08/2019ServiceDebt2310360
1/08/2019PaymentPayment4510360
1/08/2019CreditCharges78710360
1/08/2019CashFees2910360
1/08/2019DeliveryPayment2610360
1/09/2019PaymentDebt3411319
1/09/2019CashCharges4311319
1/09/2019CreditFees4711319
1/09/2019ServiceDamage43411319
1/09/2019DeliveryInfastructure5611319

 

When I do a sum of total complaints. Following is the results I'm getting at the moment;

 

Month_YearTotal complaints
1/08/201951800
1/09/201956595

 

Following is what I desire to get;

 

Month_YearTotal complaints
1/08/201910360
1/09/201911319

 

Appreciate any idea on how this can be done. Thank you in advance.

 

Best Regards,

Ashan.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , try like

sumx(Values(Table[Month_Year]), max(Table[Total complaints]))
sumx(summarize(Table,Table[Month_Year],"_1", max(Table[Total complaints])),[_1])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , try like

sumx(Values(Table[Month_Year]), max(Table[Total complaints]))
sumx(summarize(Table,Table[Month_Year],"_1", max(Table[Total complaints])),[_1])

Anonymous
Not applicable

@amitchandak Formula you provided works. Thanks a lot. Appreciate your help.

 

Best Regards,

Ashan.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors