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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

How to add two rows by a First name

I want to add up rows by First Name. So wherever there is a first name repeated I want to add them up so that the calculation of the rows give me an effort value of 1. For example I want to add the effort   by the first name Chandni which is repeated.

 

rows.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I just used pivoting and it is working now

View solution in original post

9 REPLIES 9
danextian
Super User
Super User

Hi @Anonymous ,

 

You may use ALLEXCEPT() so your formula should be something like:

Measure =
CALCULATE ( <aggregation>, ALLEXCEPT ( Table, Table[FirstName] ) )

But Power BI automatically aggregages values whenever they are added to a visual. Power BI sums up, if applicable the values of a column. If you add First Name and Effort Located to a table, it will show you the total Effort Allocated for a each unique first name unless another column is added that increases an aggregation's granularity such as same first names but different last names.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

What formula should i use to write the same for a column. I will be using that for my traffic light system then

Try this as a measure

CALCULATE (
    SUM ( 'Table'[Effort Allocated] ),
    ALLEXCEPT ( 'Table', 'Table'[First Name] )
)

Replace Table with the actual table name. 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

ITS GIVING ME WRONG RESULTS:

 

Hi @Anonymous ,

 

Please elaborate.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

ERROR.PNGSo it should 1 but its showing different sum 

Please show me a screenshot of your formula on the formula bar. It seems to me that you have used ALL instad of ALLEXCEPT.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

@danextian  Usually the effort should not exceed 1

 

error 2.PNG

Anonymous
Not applicable

I just used pivoting and it is working now

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.