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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.