cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ExcelPBI
Post Patron
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:

Capture_28.JPG

 

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
SpiroswayGR
Helper V
Helper V

@ExcelPBI 

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

 

SpiroswayGR_0-1611823139808.png

 

it is working for me well

 

View solution in original post

3 REPLIES 3
manikumar34
Solution Sage
Solution Sage

@ExcelPBI , 

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!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




amitchandak
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

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
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 !!
SpiroswayGR
Helper V
Helper V

@ExcelPBI 

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

 

SpiroswayGR_0-1611823139808.png

 

it is working for me well

 

Helpful resources

Announcements
Microsoft Build 768x460.png

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.

May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

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

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it out!

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

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

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