The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Experts
How would i amend the following so it only gives the first date of the month over the time period.
Current DAX = Calendar(Date(2012,01,01),Date(2025,01,01) which give me everyday in the moneth
But i only want to show
01/01/2012
01/02/2012 and so
Solved! Go to Solution.
CalendarFDOM =
VAR Years = SELECTCOLUMNS(GENERATESERIES(2012,2025,1),"Year",[Value])
VAR Months = SELECTCOLUMNS(GENERATESERIES(1,12,1),"Month",[Value])
VAR YearMonth = GENERATE(Years,Months)
VAR CFDOM_0 = ADDCOLUMNS(YearMonth,"Date",DATE([Year],[Month],1))
VAR CFDOM = SELECTCOLUMNS(CFDOM_0,"Date",[Date])
RETURN
CFDOM
OR
CalendarFD =
VAR Cal = CALENDAR(DATE(2012,1,1),DATE(2025,12,1))
VAR FDOM = FILTER(Cal,DAY([Date])=1)
RETURN
FDOM
The first one was for fun.
You can use one of the following formula which works best for scenario
1. FirstDate 2= DATE(YEAR(MIN('Date'[Date])),MONTH(MIN('Date'[Date])),1)
2. Firstdate = MIN('Date'[Date])
Regards,
Sayali
If this post helps, then please consider Accept it as the solution to help others find it more quickly.
Proud to be a Super User!
CalendarFDOM =
VAR Years = SELECTCOLUMNS(GENERATESERIES(2012,2025,1),"Year",[Value])
VAR Months = SELECTCOLUMNS(GENERATESERIES(1,12,1),"Month",[Value])
VAR YearMonth = GENERATE(Years,Months)
VAR CFDOM_0 = ADDCOLUMNS(YearMonth,"Date",DATE([Year],[Month],1))
VAR CFDOM = SELECTCOLUMNS(CFDOM_0,"Date",[Date])
RETURN
CFDOM
OR
CalendarFD =
VAR Cal = CALENDAR(DATE(2012,1,1),DATE(2025,12,1))
VAR FDOM = FILTER(Cal,DAY([Date])=1)
RETURN
FDOM
The first one was for fun.
many thanks experts