cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper V

## If Statement

I am trying to categorise the expected application end date by adding on 2.6 years to applicants from their app_in date.

If app_in 01/01/2024 then 2.6 years will be 01/06/2026.

App_end = if(app[age group] = "18-25", date(year(app[app_in])+2.6,

month(app[app_in]), day(app[app_in]))

1 ACCEPTED SOLUTION
Super User

Hello @M_SBS_6 ,

you can acheive what you want in the following measure

``````App_end = if(app[age group] = "18-25", date(year(app[app_in])+2,

month(app[app_in])+5, day(app[app_in])))``````

 Vote for my Community Mobile App Idea

Proud to be a Super User!

3 REPLIES 3
Resident Rockstar

You need a calculated column :

``````App_end =
IF(
app[age group] = "18-25",
EDATE(
app[app_in],
2 * 12 + 7 // here you add 2 years and 7 months to app_in date
),
app[app_in] // here your default case if age group is not "18-25"
)``````

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
Super User

How much is 0.6 of a year?  Please provide an example of the result of adding 2.6 years to a date.

Phil

If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!

Super User

Hello @M_SBS_6 ,

you can acheive what you want in the following measure

``````App_end = if(app[age group] = "18-25", date(year(app[app_in])+2,

month(app[app_in])+5, day(app[app_in])))``````

 Vote for my Community Mobile App Idea

Proud to be a Super User!

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

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

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors