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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Users online (8,350)