Forum Discussion
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"
Finally worked it out:
= IF(NOT(ISBLANK([FY Final])),if([FY Final]-[Current Financial Year]<=25,"Yes","No"))