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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
siddrow
Helper III
Helper III

If else DAX statement in data modelling tab

Hi

 

I'm struggling to work out how to write a DAX formula for what I need.

 

I have a "Current Financial Year" column (created in data modelling tab) which is whole number format (e.g. 2023) and another column that is called "FY Final" (created in power query) which is also whole number format (e.g. 2023). I then tried to create another column (created in data modelling tab) called "In 25 year Plan?" which I need say "yes" or "no" if it falls within the next 25 FY years, however in "FY Final" column there are some nulls which is making it difficult to create this if statement. 

 

I'm trying to say, only do the following if statement if "FY Final" column is not null: "FY final" column - "current financial year" column is equal to or less than 25 then "yes" otherwise "no"

 

I cannot just filter out or remove these nulls unforunately as there are other columns within that same line that has data that I need to see.
1 ACCEPTED SOLUTION

Finally worked it out:

 

= IF(NOT(ISBLANK([FY Final])),if([FY Final]-[Current Financial Year]<=25,"Yes","No"))

View solution in original post

2 REPLIES 2
siddrow
Helper III
Helper III

Current DAX formula I have tried which isn't working:

 

IF(ISBLANK([FY Final]),BLANK(),if([FY Final]-[Current Financial Year]<=25),"Yes","No"))

Finally worked it out:

 

= IF(NOT(ISBLANK([FY Final])),if([FY Final]-[Current Financial Year]<=25,"Yes","No"))

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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 Kudoed Authors