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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

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

 

Best Regards,

Ashan.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.