Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Greeting, everyone!
I have this table and I want to fill the blank stock values with the next column value, for each product and the date.
| Date | Product | Stock |
| 02/05/2023 | A | |
| 02/05/2023 | B | |
| 02/05/2023 | C | |
| 01/05/2023 | A | |
| 01/05/2023 | B | 2 |
| 01/05/2023 | C | 1 |
| 30/04/2023 | A | |
| 30/04/2023 | B | |
| 30/04/2023 | C | 2 |
| 29/04/2023 | A | 4 |
| 29/04/2023 | B | 0 |
| 29/04/2023 | C | |
| 28/04/2023 | A | |
| 28/04/2023 | B | 1 |
| 28/04/2023 | C | 1 |
| 27/04/2023 | A | 5 |
| 27/04/2023 | B | 2 |
| 27/04/2023 | C | 0 |
I tried this new column, but making an error that I am not identifying, i think i'm not getting the right filter.
Expected Value (Wrong) = IF('Table'[Stock]="",
CALCULATE(
FIRSTNONBLANK('Table'[Stock], TRUE() ),
FILTER ( ALLEXCEPT('Table','Table'[Product]), 'Table'[Date] <= EARLIER('Table'[Date]))
),
[Stock]
)
Here I add this wrong measure and the expected values. Help me!
| Date | Product | Stock | Expected Value (Wrong) | Exepected Value (right) |
| 02/05/2023 | A | 4 | 4 | |
| 02/05/2023 | B | 0 | 2 | |
| 02/05/2023 | C | 0 | 1 | |
| 01/05/2023 | A | 4 | 4 | |
| 01/05/2023 | B | 2 | 2 | 2 |
| 01/05/2023 | C | 1 | 1 | 1 |
| 30/04/2023 | A | 4 | 4 | |
| 30/04/2023 | B | 0 | 0 | |
| 30/04/2023 | C | 2 | 2 | 2 |
| 29/04/2023 | A | 4 | 4 | 4 |
| 29/04/2023 | B | 0 | 0 | 0 |
| 29/04/2023 | C | 0 | 1 | |
| 28/04/2023 | A | 5 | 5 | |
| 28/04/2023 | B | 1 | 1 | 1 |
| 28/04/2023 | C | 1 | 1 | 1 |
| 27/04/2023 | A | 5 | 5 | 5 |
| 27/04/2023 | B | 2 | 2 | 2 |
| 27/04/2023 | C | 0 | 0 | 0 |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 98 | |
| 72 | |
| 50 | |
| 48 | |
| 42 |