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
gazzo1967
Helper III
Helper III

Help with validating my date formula

HI All
Can someone explain if my logic is sound or am i on the wrong track?
g_ACTIVITY_DATE_NextDue Is a date field (confirmed)

 

g_ACTIVITY_DATE_NextDue = IF(ORACLE_V3[ROLE] = "BA", DATEADD(ORACLE_V3[g_ACTIVITY_DATE - Copy], 24,MONTH), DATEADD(ORACLE_V3[g_ACTIVITY_DATE - Copy], 12,MONTH))

but i doesnt work 😞

Thanks
Gary
2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@gazzo1967 Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 
Apologies 🙂
I will take your point 🙂

 

So this is what im trying to do.

I am trying to add  24 months to ORACLE_V3[g_ACTIVITY_DATE - Copy] field which will then write to the g_ACTIVITY_DATE_NextDue field ,
NOTE: only the row where the ORACLEV3_ROLE value is 'BA' 

All the other rows the ORACLE_V3[g_ACTIVITY_DATE - Copy] field would only add on 12 months to g_ACTIVITY_DATE_NextDue field.

I am using the following formula

g_ACTIVITY_DATE_NextDue = IF(ORACLE_V3[ROLE] = "BA"DATEADD(ORACLE_V3[g_ACTIVITY_DATE - Copy], 24,MONTH), DATEADD(ORACLE_V3[g_ACTIVITY_DATE - Copy], 12,MONTH))

 


here is the data/ expected outcome

ORACLEV3_ROLEORACLE_V3[g_ACTIVITY_DATE - Copy]g_ACTIVITY_DATE_NextDue
OUTCOME Expected
ECO12/06/202212/06/2023
FSG13/06/202213/06/2023
BA17/06/202217/06/2024
FBO15/06/202215/06/2023
EDBA16/06/202216/06/2023
L1 Water17/06/202217/06/2023

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.

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