Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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' below. The 'country consolidated' field contains just 5 countries, 'England', 'Scotland', 'international' etc.
This is an example of 'table1'
The new table would hopefully look something like this and continue to generate dates between 31/01/2018 & 31/12/2028 for each of the 5 countries found within Table1 'Country Consolidated'.
Date | Country |
31/01/2018 | England |
28/02/2018 | England |
31/03/2018 | England |
30/04/2018 | England |
Any idea on the DAX required to generate this date table?
Any help eternally appreciated
Solved! Go to Solution.
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
Proud to be a Super User!
Hi,
Would you be OK with a Power Query solution? If yes, then share Table1 in a format that can be pasted in an MS Excel file.
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
Proud to be a Super User!
Amazing! thanks so much.
Sorry for the delay - i thought I had replied to this.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
68 | |
64 | |
51 | |
39 | |
26 |
User | Count |
---|---|
84 | |
57 | |
45 | |
44 | |
35 |