Forum Discussion
Help! How do I roll forward the latest value
Hi,
I have a set of data carrying a value each year, by different locations; the value could be different, too.
Since the value only comes in once per year on a specific month, however, I need this value to roll forward to the following months, until a new value comes in.
Inactive relationship with the calendar table.
This is the current DAX formula I am using (Not sure where goes wrong),
The data should show from April 2019 each month onwards till Apr 2022 is 2.1, whereby May 2022 till May 2023 is 2.3, and June 2023 till March 2024 is 1.2.
Thank you very much!
9 Replies
- johnt75
Super User
The relationship from Calendar to 'Result table' is wrong - 'Result table' is filtering Calendar not the other way around. Delete the relationship and create a one-to-many relationship from Calendar to 'Result table'[Completed date] and your code should work.
- AKath_12Frequent Visitor
Hi,
No matter how I change the relationship, after deleting the relationship and re-creating a new one, it just automatically goes back to the Result table filter Calendar with many to one cardinality.😞
- johnt75
Super User
There should be a date column in your calendar table, with one date for each day of the years you need to cover. Link that column to a date column in your Result table. If there isn't a date column in your Result table, e.g. because there's just a year & month, create one using either DAX or Power Query set to the first day of the month and use that to link to the calendar table.
- AKath_12Frequent Visitor
Hi ,
I have created a date ([Calendar]) in the Calendar table, and changed the column format, as below:-
and, there is a date column in my result table as well:-
when I tried to link these 2 columns, the relationship automatically changed to the Result table filter Calendar table again with Many to one cardinality. 😭😭