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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
igorabdo
Advocate II
Advocate II

Sum Days

Hi everybody
I'm try to understand a query with date.
I'm working with financial data.
I've three bank.
Bank 1
Bank 2
Bank 3
And I receive this
Bank 1 - Receipts one day after maturity = D + 1
Bank 2 - Receipts one day after expiration = D + 1
Bank 3 - Receipts three days after maturity = D + 3

But my question is:
How I sum days.
I try dateadd but isn't funciont.
I want to take the date and sum more days.
For example.
If bank = bank 1; sum 3 days.....

 

Thanks Powers

1 ACCEPTED SOLUTION

Hi!!! 
I got it!

It's simple.

I use M language.

 

if [Banco] = "Safra" then Date.AddDays([Data pagamento],1) else Date.AddDays([Data pagamento],3)

 

Date.AddDays save me

 

Thanks everyone

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

@igorabdo,

Could you please share sample data of your table and post expected result based  on the sample data here?

Regards,
Lydia

Screenshot_2.pngFor example.
If Bank = Bradesco or Brasil, I want to sum more 1 day
but if the bank = Safra, I want to sum more 3 days.

https://1drv.ms/u/s!ArefD68Or43mhzDgVwxb2oxtN5NQ

Tks

Hi,

 

You can use a Custom Column as below

 

NewDate = if(Orders[Banko] = "Safra",Orders[Order Date] +3,Orders[Order Date] +1)

 

Please change "Orders" to your Table Name and

"Order Date" to field name in your file

 

Let me know if it works

 

 

Hi!!! 
I got it!

It's simple.

I use M language.

 

if [Banco] = "Safra" then Date.AddDays([Data pagamento],1) else Date.AddDays([Data pagamento],3)

 

Date.AddDays save me

 

Thanks everyone

alexei7
Continued Contributor
Continued Contributor

Hi @igorabdo,

 

Sorry, I've looked at your model and your posts and still don't understand your requirement.

 

Perhaps you could fill out the column with your expected result to help us understand what you're trying to do

 

Thanks

Alex

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors