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.
Hi,
I have a date column in a fact table; I am wanting to create a calculated column that will list the date that is 30 days from the date.
How do I do this?
Solved! Go to Solution.
Hi @Anonymous
create a calculated column that will list the date that is 30 days from the date
if leap year; When month is February; [date] + 29 days; else, when month is february; [date] +28 days
For your requirements, I would suggest as below
create calculated columns
Column = IF(DAY(EOMONTH([date],0))=28,28,IF(DAY(EOMONTH([date],0))=29,29,30))
Column 2 = [date]+IF(DAY(EOMONTH([date],0))=28,28,IF(DAY(EOMONTH([date],0))=29,29,30))
Best Regards
Maggie
Hi @Anonymous
create a calculated column that will list the date that is 30 days from the date
if leap year; When month is February; [date] + 29 days; else, when month is february; [date] +28 days
For your requirements, I would suggest as below
create calculated columns
Column = IF(DAY(EOMONTH([date],0))=28,28,IF(DAY(EOMONTH([date],0))=29,29,30))
Column 2 = [date]+IF(DAY(EOMONTH([date],0))=28,28,IF(DAY(EOMONTH([date],0))=29,29,30))
Best Regards
Maggie
HI,
next date = date + 30 , should work just fine.
Yes is should. Hey Queen, what about February? Just curious.
hm. It seems there should be some type of condition placed at som point. Here is my "fake" brainstorming that could possibly develop into a dax equation:
if leap year; When month is February; [date] + 29 days; else, when month is february; [date] +28 days
Any help?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |