Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
I need to create a calculated column to determine the total Paid Amount.
From the Payment table, sum the total paid amount for each Invoice (Inv Number) and create a calculated column in the Sale_1 table.
The calculated column should display the total paid amount only for the first sale of the invoice in the Sale_1 table (based on the first unique key). All subsequent sales should show a paid amount of 0.
Attached is the PBIX file for reference. Click Here
Result (Sales_1 Table)
| Inv_Date | Inv_No | Document | Sale_Amount | Inv_Amount | Paid_Amount |
| 1-Jul-23 | 867558757 | 565787 | 1200.00 | 2,510 | 2,510 |
| 20-Jul-23 | 867558757 | 7788686 | 1310.00 | - | - |
| 3-Jul-23 | 778807 | 8768686 | 3210.00 | 6,770 | 3,210 |
| 9-Jul-23 | 778807 | 7657657 | 3560.00 | - | - |
| 16-Jul-23 | 779049 | 5699879 | 3910.00 | 3,910 | 3,910 |
| 17-Jul-23 | 779170 | 867868 | 4260.00 | 4,260 | 4,260 |
Solved! Go to Solution.
Hi @InsightSeeker,
I'm attaching a pbix file with my solution.
Proud to be a Super User!
Hi @InsightSeeker,
I'm attaching a pbix file with my solution.
Proud to be a Super User!
try this,
Sales =
VAR _curInv = 'Table (2)'[Inv_No]
VAR _curDate = 'Table (2)'[Inv_Date]
VAR _paid = CALCULATE(
MAX('Table (2)'[Sale_Amount]),
FILTER('Table (2)','Table (2)'[Inv_Date] = _curDate))
VAR _key = CALCULATE(
MIN('Table (2)'[Unique_Key]),
FILTER('Table (2)','Table (2)'[Inv_No] = _curInv))
RETURN IF('Table (2)'[Unique_Key] = _key,_paid,0)
Hi @Arul - From the Payment table, I need to sum the total paid amount for each Invoice (Inv Number) and create a calculated column in the Sale_1 table. The suggestion which you gave doesnot calcuilate the paid amount from the payment table.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 21 | |
| 19 |
| User | Count |
|---|---|
| 41 | |
| 31 | |
| 18 | |
| 18 | |
| 15 |