Forum Discussion
Find previous blank value in previous rows
- 5 years ago
Hi 11097486 ,
You can create a calculated column like this:
Re = CALCULATE ( MAX ( 'Table'[Date1] ), FILTER ( ALL ( 'Table' ), 'Table'[Date1] < EARLIER ( 'Table'[Date1] ) && 'Table'[Column1] = BLANK () ) )Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Can you please help me with a similar query:
I have a table in which I have a product key, date filter, stages, and cost to it. The stages change from one to other at certain dates and not all dates. What I want to do is populate the last nonblank value of a stage for a given product key(given the sorting of Date is Ascending for each Product key). So my table looks like this:
| Product Key | Date | Stage | Cost |
| xyz | 1/8/2020 | borrow | 10 |
| xyz | 1/9/2020 | 10 | |
| xyz | 1/10/2020 | paid | 10 |
| xyz | 1/11/2020 | 10 | |
| xyz | 1/12/2020 | 10 | |
| xyz | 1/13/2020 | 10 | |
| abc | 1/9/2020 | borrow | 12.5 |
| abc | 1/10/2020 | 12.5 | |
| abc | 1/11/2020 | unpaid | 12.5 |
| abc | 1/12/2020 | 12.5 | |
| abc | 1/13/2020 | paid | 12.5 |
What i want is to update the previous stage for each product key(based on the fact that the date is ascending order), please note that the stages are simplified here, they can be as many as 10-12 different stages. Result table should be like:
| Product Key | Date | Stage | Cost |
| xyz | 1/8/2020 | borrow | 10 |
| xyz | 1/9/2020 | borrow | 10 |
| xyz | 1/10/2020 | paid | 10 |
| xyz | 1/11/2020 | paid | 10 |
| xyz | 1/12/2020 | paid | 10 |
| xyz | 1/13/2020 | paid | 10 |
| abc | 1/9/2020 | borrow | 12.5 |
| abc | 1/10/2020 | borrow | 12.5 |
| abc | 1/11/2020 | unpaid | 12.5 |
| abc | 1/12/2020 | unpaid | 12.5 |
| abc | 1/13/2020 | paid | 12.5 |
Your help is really appreciated,
thanks,
Hello, would a simple fill down in Power Query work?