cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ikrutko
New Member

Return Value a Year Ago

Hi all,

I am trying to show a 1-Year Ago Mortality Rate using the below formula, but get the same number as the date selected for the table using a filter.

 

1-Year Ago Mortality rate= CALCULATE(Sum('Test'[Mortality Rate]), DATEADD('Test'[Date].[Date], -1, Year))

 

Any ideas?

1 REPLY 1
Jihwan_Kim
Super User
Super User

I am not sure how your data model looks like, but please try the below.

- create a Dim-Date Table

- assign as a date table

- create a relationship between the Test table and Dim-Date table

- use 'Dim-Date'[Date] column in your measure


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Best regards, JiHwan Kim

Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.