Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
EdouardPBI
Frequent Visitor

YTD and SAMEPERIODLASTYEAR problem (multiple fiscal year)

Hello everyone

i have a little problem with this case 

 

 

I have companies with different closing dates,

I have a calendar table that includes all the dates of each fiscal year by company,

my problem: I can't retrieve the YTD and the sameperiodlastyear

Does somebody have an idea ??

TotalYTD or Sameperiolastyear don't work

 

thanks a lot 🙂

 

the différent exercice 

EdouardPBI_0-1678620516877.png

calendar table per compagny (cle_date_ste = concat ( cod_ste & sales date) 

 

EdouardPBI_1-1678620572962.png

 

EdouardPBI_2-1678620613201.png

 

EdouardPBI_3-1678620663186.png

 

 

 

 

1 ACCEPTED SOLUTION

unfortunately I already did , as you can see I already have a calendar table

the problem is that my exercise table has duplicate values ​​because I finally have a date for two companies, hence the concatenation of date + ste

View solution in original post

2 REPLIES 2
Padycosmos
Solution Sage
Solution Sage

You may create a calendar  table using calendaryearauto(fiscal year end month) and link it to your table(s)

https://learn.microsoft.com/en-us/dax/calendarauto-function-dax

Padycosmos_0-1678623793603.png

This video might help:

https://www.youtube.com/watch?v=ef-KmCB-qXY

 

unfortunately I already did , as you can see I already have a calendar table

the problem is that my exercise table has duplicate values ​​because I finally have a date for two companies, hence the concatenation of date + ste

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors