Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Andregewehr
Helper I
Helper I

Dealing with blank valuews by using next in column

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.

 

DateProductStock
02/05/2023A 
02/05/2023B 
02/05/2023C 
01/05/2023A 
01/05/2023B2
01/05/2023C1
30/04/2023A 
30/04/2023B 
30/04/2023C2
29/04/2023A4
29/04/2023B0
29/04/2023C 
28/04/2023A 
28/04/2023B1
28/04/2023C1
27/04/2023A5
27/04/2023B2
27/04/2023C0

 

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!

 

 

DateProductStock
Expected Value (Wrong)
Exepected Value (right)
02/05/2023A 44
02/05/2023B 02
02/05/2023C 01
01/05/2023A 44
01/05/2023B222
01/05/2023C111
30/04/2023A 44
30/04/2023B 00
30/04/2023C222
29/04/2023A444
29/04/2023B000
29/04/2023C 01
28/04/2023A 55
28/04/2023B111
28/04/2023C111
27/04/2023A555
27/04/2023B222
27/04/2023C000

 

0 REPLIES 0

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors