Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone!
I am trying to create a table using the DatesBetween function where I want the table to have yearly increments. I am using the below formula which gives all the dates between the two dates but I am unable to figure out how to get yearly increments:
Model Dates = DATESBETWEEN('Calendar'[Date], [Model start date], [Model end date])
Thank you for your help!
Cheers
Solved! Go to Solution.
Hi , @sgupta22
Here are the steps you can refer to :
(1)This is my test data:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @sgupta22
Here are the steps you can refer to :
(1)This is my test data:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@sgupta22 What do you mean "year increments" ?
@Greg_Deckler I mean rather than getting a table which has daily dates between the two dates, I want it to be something like this:
31-Dec-2010
31-Dec-2011
31-Dec-2012
31-Dec-2013
31-Dec-2014
and so on...
Cheers
@sgupta22 Try:
Model Dates =
DISTINCT
SELECTCOLUMNS(
SUMMARIZE(
DATESBETWEEN('Calendar'[Date], [Model start date], [Model end date]),
'Calendar'[Year],
'__Date',MAX('Calendar'[Date])
),
"Date",[__Date]
)
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
39 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
44 | |
32 | |
30 | |
18 | |
17 |