Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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