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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register 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
Employee
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
Employee
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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.