Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
hello,
i have to create new table with dummy transaction base on
CustomerCreatedDate
Sample:
CustomerName , CreateDate
John a , 01/08/2021
I need to create a new table with one row per month till current month
John a , 01/08/2021
John a , 01/09/2021
John a , 01/10/2021
John a , 01/11/2021
John a , 01/12/2021
How can i do this with Dax or M query
thanks
Solved! Go to Solution.
@Urielpc pbix is attached; the DAX uqery is following
Table 2 =
VAR _1 =
ADDCOLUMNS (
'Table',
"lastDate", DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
)
VAR _2 =
FILTER (
GENERATE (
_1,
DATESBETWEEN ( 'Calendar'[Date], 'Table'[CreatedDate], [lastDate] )
),
DAY ( [Date] ) = 1
)
RETURN
_2
@Urielpc pbix is attached; the DAX uqery is following
Table 2 =
VAR _1 =
ADDCOLUMNS (
'Table',
"lastDate", DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
)
VAR _2 =
FILTER (
GENERATE (
_1,
DATESBETWEEN ( 'Calendar'[Date], 'Table'[CreatedDate], [lastDate] )
),
DAY ( [Date] ) = 1
)
RETURN
_2
User | Count |
---|---|
14 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |