Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have 2 tables as follows:
Sales invoice header:
Sales invoice line:
The relation is on ID one to many (one header, several sales line).
I want to sum all sales line in for each ID in the "sales invoice header" in a new colume Sales amount (as mared in red above).
What dax function can do that?
@kseeger Please try following measure in sales Invoice Header
Measure = SUMX(RELATEDTABLE(Sales invoice line),Sales invoice line[Saleline])
In case it doesn't work please share sample data along with expected result after masking sensitive data
Sales invoice header |
ID Customer
220100 a
220101 b
220102 c
220103 d
Sales invoice line | |
ID | Sales line amount |
220100 | 100 |
220100 | 200 |
220100 | 100 |
220101 | 130 |
220101 | 100 |
220101 | 200 |
220101 | 150 |
220102 | 150 |
220102 | 200 |
220102 | 320 |
220102 | 105 |
220102 | 160 |
220102 | 130 |
220103 | 200 |
220103 | 261 |
220103 | 360 |
220103 | 120 |
This is what i need to get:
Sales invoice header |
ID Customer Sales amount
220100 a 400
220101 b 580
220102 c 1065
220103 d 941
Measure = SUMX(RELATEDTABLE('Sales invoice line'),'Sales invoice line'[Sales line amount])
Please create this measure in Sales Invoice header and create relationship between this two tables
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |