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
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors