Forum Discussion
ClemFandango
2 years agoAdvocate II
Create date table between two dates and add a column from another table
Hi there, I would like to create a new date table for every end of month between 31/01/2018 & 31/12/2028, but including the 'country consolidated' field as an extra column found within 'table1' b...
- 2 years ago
Try this calculated table:
DatesWithCountry = VAR vCalendar = CALENDAR ( DATE ( 2018, 1, 1 ), DATE ( 2028, 12, 31 ) ) VAR vCalendarEOM = FILTER ( vCalendar, [Date] = EOMONTH ( [Date], 0 ) ) VAR vCountries = VALUES ( Table1[Country Consolidated] ) VAR vResult = GENERATE ( vCalendarEOM, vCountries ) RETURN vResult
DataInsights
2 years agoSuper User
Try this calculated table:
DatesWithCountry =
VAR vCalendar =
CALENDAR ( DATE ( 2018, 1, 1 ), DATE ( 2028, 12, 31 ) )
VAR vCalendarEOM =
FILTER ( vCalendar, [Date] = EOMONTH ( [Date], 0 ) )
VAR vCountries =
VALUES ( Table1[Country Consolidated] )
VAR vResult =
GENERATE ( vCalendarEOM, vCountries )
RETURN
vResult
ClemFandango
2 years agoAdvocate II
Amazing! thanks so much.
Sorry for the delay - i thought I had replied to this.