We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi,
I am trying to create a Dimdate table in power bi and the table should contain all dates from today's month last year till today. I have used CALENDAR(DATE(YEAR(TODAY()),MONTH(TODAY())-13,DAY(TODAY())),today()) however it is not solving my purpose as the result contains dates from today's date 13 months ago till today. I need the table to contain dates from 1st of same month last year till today
Eg - as today is 10/13/2017, the table contains data from 10/13/2016 till 10/13/2017 but i need my table to contain data from 10/1/2016 till 10/13/2017
Thanks in advance
Regards,
Rohith
Solved! Go to Solution.
Hey,
I just copied this statement from sample table, on a 2nd look I realized that the CALENDAR(<Startdate>, <Enddate>) function was missing, but now it's complete
Table = CALENDAR( DATE(YEAR(TODAY())-1,MONTH(TODAY()),1), TODAY())
Regards
Tom
Hey,
try this
CALENDAR= DATE(YEAR(TODAY())-1,MONTH(TODAY()),1), TODAY())
Hopefully this is what you are looking for
Regards
Tom
Hi Tom,
Thanks for quick response however I am getting an error. Played around with the braces still no luck
Regards,
Rohith
Hey,
I just copied this statement from sample table, on a 2nd look I realized that the CALENDAR(<Startdate>, <Enddate>) function was missing, but now it's complete
Table = CALENDAR( DATE(YEAR(TODAY())-1,MONTH(TODAY()),1), TODAY())
Regards
Tom
Works as expected Thanks a ton!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 54 | |
| 39 | |
| 34 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 62 | |
| 38 | |
| 34 | |
| 22 |