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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

How to add two custom columns to a Date table to sum amounts from another field

Hi,

 

I have a manually created Date Table called 'Date Table' and I'd like to add two manually created columns to it.  One column needs to sum the 'ClaimData'[PlanPaid_AnnualTotal] amount based on the 'ClaimData'[PaidDateMMMYY] field while the other needs to sum the 'ClaimData'[PlanPaid_AnnualTotal] amount based on the 'ClaimData'[IncurredFromMMMYY] field.

 

Here is an example of the Date table:

1.PNG

 

And here is an example of the ClaimData table:

2.PNG

 

I need to somehow add two manually created columns to my Date Table:

1)  One column [PaidDateAmount] that will sum the ClaimData[PlanPaid_AnnualTotal] field where 'Date Table'[IncurredDateSort] matches ClaimData[PaidDateMMMYY]. 

2)  And another [IncurredDateAmount] that will sum the ClaimData[PlanPaid_AnnualTotal] field where 'Date Table'[IncurredDateSort] matches ClaimData[IncurredDateMMMYY]. 

 

Essentially, I want the result of my Date Table to look like this:

3.PNG

 

I know Date tables are not typically used like this but my project is pretty large and complex as it is.  I only want to create the Date table like this so I can plot these two amounts one a chart visual for a very specific request.

4.PNG

 

Thank you!  I'll be monitoring the post if you have any questions for me.

1 ACCEPTED SOLUTION

@Anonymous 

 

Please create those two new measures and not columns, don't require to create two columns in the DATE table.

Just drag the measures on the Charts/Visuals and date from Date table.

 

You can share your pbix with dummy data, and I can try to fix that. If sharing the file not possible please try above. Let me know if this works

View solution in original post

6 REPLIES 6
mhossain
Solution Sage
Solution Sage

Hello @Anonymous 

 

So your objective is to bring these two new number columns to chart/table by Date (from date table). Inspite of creating two columns in the data table, try to do below:

 

1). Create first measure [PaidDateAmount] as

CALCULATE(
sum(ClaimData[PlanPaid_AnnualTotal]), TREATAS (values('Date Table'[IncurredDateSort]),ClaimData[PaidDateMMMYY]))

2). Create second measure [IncurredDateAmount] as

CALCULATE(

sum(ClaimData[PlanPaid_AnnualTotal]), TREATAS (values('Date Table'[IncurredDateSort]),ClaimData[IncurredDateMMMYY]))
 

Thats it, now you can drag your date from the Date table and these two measures.

Note, I typed DAX code in a notepad so might be some spelling mistakes, hope this works for you.

Please let me know if above is working or if you have any further questions.

 

Anonymous
Not applicable

Thank you for the help so far but it isn't working.  I do not have any physical relationships and need to keep it that way.  Here are my two created columns:

 

IncurredDateAmount =
CALCULATE (
   SUM ( ClaimData[PlanPaid] ),
      TREATAS (
         VALUES ( 'Date Table'[Date] ), ClaimData[IncurredDateMMMYY]
   )
)
 
 
 
PaidDateAmount =
CALCULATE (
   SUM ( ClaimData[PlanPaid] ),
      TREATAS (
         VALUES ( 'Date Table'[Date] ), ClaimData[PaidDateMMMYY]
   )
)
 
The issue is that for some reason my results for each date are now the same...any ideas?  Maybe we are not using TREATAS the correct way?
 
5.PNG

@Anonymous 

 

Please create those two new measures and not columns, don't require to create two columns in the DATE table.

Just drag the measures on the Charts/Visuals and date from Date table.

 

You can share your pbix with dummy data, and I can try to fix that. If sharing the file not possible please try above. Let me know if this works

Anonymous
Not applicable

Thank you!  I was very confused.  Thank you so much.

@Anonymous 

Glad it worked.

@Anonymous 

In addition to previous comment, I guess there are no relationship between these tables, if you have already created physical relationship between the tables between these two tables in any way, in the same MEASURES you can remove the relationship first in order to get it working

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.