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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.