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 - I have been using the below DAX from the brilliant Ried Havens to slice data by time periods such as YTD, MTD, PYTD etc,
What I need is to define the start of Previous Fiscal Year with a start date of 01/07/2020 in order to calculate the PYTD.
The important part is below in bold but full code included.
Solved! Go to Solution.
@AndySmith , In case you are trying to calendar take it from
.Creating Financial Calendar - From Any Month
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calend...
new columns
Last year start date =
Startofyear(dateadd([Date],-1,year),"6/30")
Last year End date =
Endofyear(dateadd([Date],-1,year),"6/30")
make sure you calendar also start from July
@AndySmith , In case you are trying to calendar take it from
.Creating Financial Calendar - From Any Month
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calend...
new columns
Last year start date =
Startofyear(dateadd([Date],-1,year),"6/30")
Last year End date =
Endofyear(dateadd([Date],-1,year),"6/30")
make sure you calendar also start from July
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 |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |