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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Functions if + and

Hello everyone,

 

Could you help me?

With the data set below I want to create a "dta prov 2" that returns me a date, in the format mm/yyyy, corresponding to the month and year that results from the billdate + 210 days (7 months) . This is the information I have in "Dta Prov" (Dta Provisão = IF(MONTH('Facturas GCobros'[billdate].[Date]) < MONTH( TODAY()); FORMAT(DATEADD('Facturas GCobros'[billdate].[Date];210;DAY);"mm/yyyy");BLANK() & IF(YEAR('Facturas GCobros'[billdate].[Date]) < YEAR( TODAY()); FORMAT(DATEADD('Facturas GCobros'[billdate].[Date];210;DAY);"mm/yyyy"); BLANK())).

 

But, beside this, I want this new column to consider also all the invoces that has  "Pending" =  0, regardless of the previous permiss.

 

So, if DTA PROVISAO = mm/yyyy (today) & PENDING = 0, then "dta prov 2" = mm/yyyy (today)

 

NameInvoicePendingProvisionBilldateDta Provisao
ipsum531016090,00738,0031/07/200501/2006
lorem631017330,002.586,0030/06/200501/2006
alfa1114548318.625,000,0031/05/201812/2018
beta111457280,003.895,0031/05/201812/2018
omega111468864.207,000,0031/07/201802/2019
charlie111470440,006.000,0031/07/201802/2019
gamma11147697500,000,0030/09/201804/2019
delta111476984.000,000,0030/09/201804/2019

 

I've been struggling with the "IF's" and "AND's", but with no results, so far...if someone has any idea, i would appreciate!

 

Thank you,

Irene

1 REPLY 1
HotChilli
Super User
Super User

dta2 = VAR _today = FORMAT(TODAY(), "MM/YYYY")  
RETURN
IF (AND( FORMAT(Table4[Dta Provisao], "MM/YYYY") = _today, Table4[Pending] = 0.00), _today)

Try this

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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