Forum Discussion
Anonymous
2 years agoNot applicable
Dates between giving unexpected response
Good morning, I have a table with a column with continuous dates between today and 2 years ago. I am trying to use the code below to create a table with time periods. My intent is to create a co...
- 2 years ago
Hi Anonymous
Please tryDate Periods = ADDCOLUMNS ( CALENDAR ( TODAY () - 730, TODAY () ), "Type", IF ( [Date] < TODAY () - 365, "Vendor 2 Year", "Asset 1 Year" ) )
BeaBF
Super User
2 years agoAnonymous Hi!
Try with:
Date Periods =
UNION(
ADDCOLUMNS(
FILTER(MyDate, MyDate[Date] >= TODAY() && MyDate[Date] < TODAY() - 365),
"Type", "Asset 1 Year"
),
ADDCOLUMNS(
FILTER(MyDate, MyDate[Date] >= TODAY() - 365 && MyDate[Date] < TODAY() - 730),
"Type", "Vendor 2 Year"
)
)
BBF
Anonymous
2 years agoNot applicable
Thank you for the response, once again I get a blank table.
here is the code for my date table if that helps, it is just dates, unsummarized, formatted in DD/MM/YYYY (Short Date)
MyDate =
CALENDAR(
min(Historic1[Date]),
MAX(Historic1[Date])
)
Ive done similar things before but using previousqtr or previous month in place of the datesinbetween, but this seems to not work. I apprecaite the response, thank you
Lola