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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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