Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hello All,
Hope you all are safe. Iam writing here for two of my requirements
I have two tables(Arrivals & Calender). Iam linking Arrival Date column of Arrivals Table with Date Column in Calender.
Now, i have to calculate two values:
1. YTD Arrivals: which should get me the count of arrivals from beginning of fiscal year to current date.
2.Total Booked: Which should get me the count of arrivals after current date to beginning of New fiscal year.
My Fical Year is October 1st to September 30th.
Hoping for a Expert Solution
Many Thanks
Solved! Go to Solution.
Hi @techvidya
Due to I don't know your data model, I build two table sample to have a test.
Arrival Table(Arrival Data Column , Quantity Column)
Calendar table:
Calendar = CALENDAR(DATE(2018,01,01),DATE(2020,12,31))
You can build measure to calculate YTD Arrivals and Total Books.
YTD Arrivals: It will calculate the sum of arrivals between 2019/10/01 and Today(2020/09/29)
YTD Arrivals =
CALCULATE (
SUM ( Arrival[Quantity] ),
FILTER (
Arrival,
Arrival[Arrival Date]
>= DATE ( YEAR ( TODAY () ) - 1, 10, 01 )
&& Arrival[Arrival Date] <= TODAY ()
)
)
Total Booked:It will calculate the sum of arrivals between 2020/09/30 and 2020/10/01 (no equal)
Total Booked =
CALCULATE (
SUM ( Arrival[Quantity] ),
FILTER (
Arrival,
Arrival[Arrival Date] > TODAY ()
&& Arrival[Arrival Date] < DATE ( YEAR ( TODAY () ), 10, 01 )
)
)
For more details, you can download the pbix file from this link: YTD for Fiscal Year
If this reply still couldn't help you solve your problem, you can show me your data model, or you can provide me with your pbix file.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @techvidya
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou
Hi @techvidya
Due to I don't know your data model, I build two table sample to have a test.
Arrival Table(Arrival Data Column , Quantity Column)
Calendar table:
Calendar = CALENDAR(DATE(2018,01,01),DATE(2020,12,31))
You can build measure to calculate YTD Arrivals and Total Books.
YTD Arrivals: It will calculate the sum of arrivals between 2019/10/01 and Today(2020/09/29)
YTD Arrivals =
CALCULATE (
SUM ( Arrival[Quantity] ),
FILTER (
Arrival,
Arrival[Arrival Date]
>= DATE ( YEAR ( TODAY () ) - 1, 10, 01 )
&& Arrival[Arrival Date] <= TODAY ()
)
)
Total Booked:It will calculate the sum of arrivals between 2020/09/30 and 2020/10/01 (no equal)
Total Booked =
CALCULATE (
SUM ( Arrival[Quantity] ),
FILTER (
Arrival,
Arrival[Arrival Date] > TODAY ()
&& Arrival[Arrival Date] < DATE ( YEAR ( TODAY () ), 10, 01 )
)
)
For more details, you can download the pbix file from this link: YTD for Fiscal Year
If this reply still couldn't help you solve your problem, you can show me your data model, or you can provide me with your pbix file.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You already have a calendar table. It should have columns for Fiscal Month, Fiscal Quarter and Fiscal Year.
In addition functions like TOTALYTD allow you to specify the last month of your fiscal year. (Fiscal quarters sadly are not suported by the TOTALQTD function)
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.