cancel
Showing results for
Did you mean:
Post Patron

## FYTD DAX doesn't work

Hi Community,

I need help with calculating FYTD sum. Our Financial year runs from July to June. Following is a snapshot of my sample dataset & measures:

FYTD sum should be 360.

FYTD sum = totalytd(CALCULATE([Total sales]),Datedim[Date],"06/30")

My sample pbi file: https://1drv.ms/u/s!Ag919_pO_UKrgQ7LnPwPrdOWvT3t?e=yq6eGw

Many thanks,

1 ACCEPTED SOLUTION
Helper V

FYTD sum = CALCULATE(SUM(Table_name[Sales_field]),Table_name[FYDate]<date(2021,06,31),Table_name[FYDate]>date(2020,07,01))

it is working for me well

3 REPLIES 3
Solution Sage

Try something like thi.

Calculate(SUM(Table[Sales]),DATESYTD(Table[Date],"30/6")

Check another example with the following link

https://community.powerbi.com/t5/Desktop/DAX-of-YTD-and-LYTD-based-on-Fiscal-year-1st-Sept-to-31st-A...

Regards,

'Manikumar

If this helps, Appreciate your KUDOS!

Proud to be a Super User!

Super User

@ExcelPBI , This is happening because you have not selected any date filter. And end date of calender in 12/31/2021 , means FYTD from that date.

Please select any date is FY you will get the correct data.

Find the file attached after signature

I have discussed all these in https://www.youtube.com/watch?v=OBf0rjpp5Hw

Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!
Helper V

FYTD sum = CALCULATE(SUM(Table_name[Sales_field]),Table_name[FYDate]<date(2021,06,31),Table_name[FYDate]>date(2020,07,01))

it is working for me well

Announcements

#### Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

#### The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

#### Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

#### Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Top Solution Authors
Top Kudoed Authors