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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
conniedevina
Helper I
Helper I

Last YTD based on last date from data aupload

Hi All,

 

I have an issue regarding Last YTD, I have this sample data

conniedevina_1-1701940094811.png

I would like to achieve the total data 2022 till Aug.. because the current year data only available till August 2023.

I understand to use DatesYTD function but when I tried to use with flexible date somehow not working.

Below is the DAX I tried

m_LY FY = CALCULATE(SUM(Value), DATESYTD(dateadd('Date'[Date],-1,Year),FORMAT(MAX(Completions[Training Record Completed Date]),"MM/YY")))

Would appreciate any help provided! Thank you!

1 ACCEPTED SOLUTION

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1702005936492.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Bibiano_Geraldo
Resolver I
Resolver I

Try the following code, and see if is what you need

m_LY FY = 
CALCULATE(
    SUM(Value), 
    SAMEPERIODLASTYEAR(
        'Date'[Date]
        )
)

Hi @Bibiano_Geraldo 

Thanks for replying, I'm using the calculation but seems it's still showing me "Total all 2022"

conniedevina_0-1701999432060.png

While I am trying to achieve total 3774

 

as reference I put the pbix file here PBI File 

I would like to use "Date" Table to show the dates.

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1702005936492.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur 


Thank you so much for the help, so I should create the "Date" Table following the Transaction table is it?

Thank you for help!

You are welcome.  Yes.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.