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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
krrish116
Resolver II
Resolver II

Filtering the distinct values of one column and calculate some measures for other columns

Hi @amitchandak 

Please find the dummy data,

Supp. No.Cust No.Cust Name Value Compliance Category
4403843009-0000333793G CUSTOM SERVICES INC$85.00CompliantGM
4403843009-0000333793G CUSTOM SERVICES INC$85.00CompliantGM
4403843009-0000333793G CUSTOM SERVICES INC$85.00CompliantGM
4403843009-0000333793M CUSTOM SERVICES INC$366.50CompliantGM
4403843009-0000333793M CUSTOM SERVICES INC$577.60CompliantGM
4403843009-0000333793WHM CUSTOM SERVICES INC$486.40CompliantGM
4403843009-0000333793WHM CUSTOM SERVICES INC$653.60CompliantGM
4403843009-0000333793WHM CUSTOM SERVICES INC$501.60CompliantGM
4403843009-0000333793WHM CUSTOM SERVICES INC$760.00CompliantGM
4403841515-0000177159ONPOINT INDUSTRIAL SERVICES LLC$278.00CompliantGM
4403841515-0000177159ONPOINT INDUSTRIAL SERVICES LLC$278.00CompliantGM
4403841515-0000177159ONPOINT INDUSTRIAL SERVICES LLC$278.00CompliantGM
4403841515-0000177159ONPOINT INDUSTRIAL SERVICES LLC$227.10CompliantGM
4403841515-0000177159ONPOINT INDUSTRIAL SERVICES LLC$542.20CompliantGM
4403841515-0000177159ONPOINT INDUSTRIAL SERVICES LLC$732.70CompliantGM
4403807762-0000477857BROCK SERVICES LLC$280.90CompliantGM
4403807762-0000477857BROCK SERVICES LLC$280.90CompliantGM
4403807762-0000477857BROCK SERVICES LLC$280.90CompliantGM
4403807762-0000477857BROCK SERVICES LLC$280.90CompliantGM

 

in the above data i have to calculate the sum of value column for distinct of supp.no. column

in excel im getting but im unable to do it in power bi.

DAX Measure i used: 

Total Value = CALCULATE(SUM('alKpis'[Value]),FILTER('alKpis',(DISTINCTCOUNT('alKpis'[supp.no.]))))
 
Thanks,
Krishh
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@krrish116 , Try a measure like

Total Value = SUMX(values('alKpis'[supp.no.]),CALCULATE(distinctcount( 'alKpis'[Value])))

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
krrish116
Resolver II
Resolver II

Thank you @amitchandak ...

Thank you very much...

let me try thr measure once...

 

 

amitchandak
Super User
Super User

@krrish116 , Try a measure like

Total Value = SUMX(values('alKpis'[supp.no.]),CALCULATE(distinctcount( 'alKpis'[Value])))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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