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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
revansh
Helper IV
Helper IV

Sum of a value based on set of distinct columns

Hi All,

 

I am trying to add a measure to calculation sum of a value based on a set of distinct values. My sample dataset is.

 

NY  ROAD   01-may   10   SYS1

NY  ROAD   02-May   10   SYS2

NY ROAD    02-MAY   10   SYS3

NY  ROAD   03-MAY   10   SYS4

 

i WANT TO SHOW MY DATA IN REPORT LIKE BELOW.

 

NY  ROAD  MAY    30 .........(I WANT TO REMOVE ONE ROW WHICH IS A DUPLICATE ,02-MAY)

 

tHANKS

 

1 ACCEPTED SOLUTION
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @revansh ,

You could refer to below measure:

Sample data:

1.PNG

Measure = CALCULATE(SUM(Table1[Column1.4]),FILTER(('Table1'),'Table1'[Column1.3]<>MAX('Table1'[Column1.3])))

Result:

2.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @revansh ,

You could refer to below measure:

Sample data:

1.PNG

Measure = CALCULATE(SUM(Table1[Column1.4]),FILTER(('Table1'),'Table1'[Column1.3]<>MAX('Table1'[Column1.3])))

Result:

2.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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