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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tracyhopaulson
Resolver I
Resolver I

how to sum records for the same condition

How do I sum the last 2 records on 2/8 to show the 2.15 balance since they belong to the same person & order? 

The other 2 records need to stay as is.  Please help.  Thanks

 

Capture.PNG

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @tracyhopaulson,

You can write a measure formula to use name and order groups to summarize records:

Measure =
CALCULATE (
    SUM ( Table[Total] ),
    ALLSELECTED ( Table ),
    VALUES ( Table[Name] ),
    VALUES ( Table[Order] )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

You've got several replies. You may follow any of these approaches depending on your requirements. 










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


Proud to be a Super User!









"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.
v-shex-msft
Community Support
Community Support

HI @tracyhopaulson,

You can write a measure formula to use name and order groups to summarize records:

Measure =
CALCULATE (
    SUM ( Table[Total] ),
    ALLSELECTED ( Table ),
    VALUES ( Table[Name] ),
    VALUES ( Table[Order] )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

In UI , you could use sum operation and rest can be used as unsummarized in a table or matrix. Should given that.

 

You can also use summarize to create new table

 

new Table = summarize(table,table[date],table[name],table[order],table[oper],"Total",sum(table[total]))

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

danextian
Super User
Super User

Hi @tracyhopaulson ,

 

You can use the group by function in the Query Editor.

group b y.pngBy the way and moving forward, please post a sample data that can be easily copy-pasted (not an image). 










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


Proud to be a Super User!









"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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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