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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
InsightSeeker
Helper III
Helper III

Calculated Column

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_DateInv_NoDocumentSale_AmountInv_AmountPaid_Amount
1-Jul-238675587575657871200.00             2,510                2,510
20-Jul-2386755875777886861310.00                    -                         -  
3-Jul-2377880787686863210.00             6,770                3,210
9-Jul-2377880776576573560.00                    -                         -  
16-Jul-2377904956998793910.00             3,910                3,910
17-Jul-237791708678684260.00             4,260                4,260
1 ACCEPTED SOLUTION
_AAndrade
Super User
Super User

Hi @InsightSeeker,

I'm attaching a pbix file with my solution.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




View solution in original post

3 REPLIES 3
_AAndrade
Super User
Super User

Hi @InsightSeeker,

I'm attaching a pbix file with my solution.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Arul
Super User
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)




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

Proud to be a Super User!


LinkedIn


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.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors