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
Joe_100
Helper I
Helper I

Compare this year vs last year till today

Hi,

 

It seems like a very easy question but i got a hard time figuring out.

 

I have a table with some sales transactions, for this example just a simple transactiondate and an amount.

 

I want to sum the amount of this year 2018 up till now but also want to show what we did last year untill the same date as today but then a year ago.

 

how can i achieve this? Tried the sameperiodlastyear dax function but it only returns the whole year of 2017..

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @Joe_100,

 

For time intelligence function, you need a calendar table with relationship to current table. Then calculate result with time intelligence function with calendar date.

 

Reference links:

YTD last year DAX

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @Joe_100,

 

For time intelligence function, you need a calendar table with relationship to current table. Then calculate result with time intelligence function with calendar date.

 

Reference links:

YTD last year DAX

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.