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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Black_Mamba
Frequent Visitor

logic for dates calculation dax

Im looking for a way to create a logic that if the dates are in the last 90 days it returns "last 90 days", else
it returns the "last 2 years" dates (including the 90 days). I have a date table upto current date that im using.
The issue currently is that my regular if else statement will exclude the 90 days when returning the last 2 years the
Any suggestions appreciated!

1 REPLY 1
v-lili6-msft
Community Support
Community Support

Hi,@Black_Mamba

   how do you display the result? for example: if it displayed in the column, current date is 2018-08-21, so when date is 2018-08-20,

it returns "last 90 days" and "last 2 years"? it can't achieve, So could you show us what do you want to apply it?

please share detail steps for us to reproduce the issue. 

You can share some data sample and the formula and the expected output. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.

 

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.