Forum Discussion
Anonymous
6 years agoNot applicable
Fill in previous values
I need to fill in values for each week based on previous values. Nothing I've tried is working. I have to use DAX, no Power Query. I have fields for Entity, WeekEnd Date, and Status. The matrix loo...
Anonymous
6 years agoNot applicable
Unpivoted would look like this:
| Entity | WeekEnd | Status |
| EntityA | Jun 5 | Pending Approval |
| EntityA | May 29 | |
| EntityA | May 22 | |
| EntityA | May 15 | In Progress |
| EntityA | May 8 | Pending Approval |
| EntityA | May 1 | Ready |
| EntityA | Apr 24 | Needs Assignment |
Does that help with figuring out the DAX?
FrankAT
Community Champion
6 years agoHi Anonymous,
the unpivoted sample data looks like that:
But it's not clear what's the rule to fill in the missing values?
Regards FrankAT
- Anonymous6 years agoNot applicable
FrankAT It's probably easier to see what I want in the linked PBIX.
Switch your sort on the unpivoted data like I did, sorting on Entity instead of date.
What I want is: for each date, if an entity has a status, use that status. If it doesn't have a status, look back to the last non blank status (or date?) and use that.
So for Entity A, on May 22 there is no status so it needs to look back to May 15 to find the status to use.