Forum Discussion
Create a calculated column for a specifik date range
- Anonymous4 years ago
Hi Regnbagar1 ,
Please refer to my pbix file to see if it helps you.
Create a column.
Column = VAR _previous1 = DATE ( YEAR ( EDATE ( TODAY (), -1 ) ), MONTH ( EDATE ( TODAY (), -1 ) ), 25 ) VAR _previous2 = DATE ( YEAR ( EDATE ( TODAY (), -2 ) ), MONTH ( EDATE ( TODAY (), -2 ) ), 25 ) RETURN IF ( 'Table'[date] > _previous2 && 'Table'[date] <= _previous1, 1, IF ( TODAY () >= _previous1, 0, BLANK () ) )If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.
Best Regards
Community Support Team _ Polly
Hi,
Thank for the feedback. In my date table (see picture) I want to create a calculated dynamic table called "date range". The dates that are between the 25:th and 25:th the month before should have a 1 in "date range" column. In the example below the dates between 25:th of january and 25:th of february shoud have 1 in "date range" column and the rest of the dates 0 in "date range" column.
Kind Regards
Regnbagar1 , try a new column like
if([Date] <= Today() ,if(Day([Date])<=25, datediff(eomonth([Date],-2) +26 ,datediff(eomonth([Date],-1) +26) ,today(),month), blank())
- Regnbagar14 years ago
Helper I
Thank you so much. When I try the function I get the error message "Too few arguments were passed to the DATEDIFF function. The minimum argument count for the function is 3."
Do you know how I can handle that in the best way?