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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Problem with calculated column

I created a calculated colum with the following code:
PRESSA GUESS = LASTNONBLANKVALUE(Merge3[Merge2.cp01.frman], MIN(Merge3[Merge2.cp01.frman]))
Which is not working
I would like to make it return for the same (item - on the right) the earlier value in chronogical terms when it's blank.

Any suggestion?

marcoproserpio_2-1633696629370.png


Expected output is like the present calculated column but with value 31 loaded on it.
Thank you.


 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Couldn't make it work within that one, solved within this one:

Column =
VAR ThisData = Merge3[Dates]
VAR DataMax = CALCULATE(MAX(Merge3[Dates]), FILTER(ALLEXCEPT(Merge3, Merge3[items.itnbr]), Merge3[Dates]<= ThisData && LEN(Merge3[Merge2.cp01.frman])>0))
RETURN
CALCULATE(MAX(Merge3[Merge2.cp01.frman]), FILTER(ALLEXCEPT(Merge3,Merge3[items.itnbr]), Merge3[Dates] = DataMax))

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Couldn't make it work within that one, solved within this one:

Column =
VAR ThisData = Merge3[Dates]
VAR DataMax = CALCULATE(MAX(Merge3[Dates]), FILTER(ALLEXCEPT(Merge3, Merge3[items.itnbr]), Merge3[Dates]<= ThisData && LEN(Merge3[Merge2.cp01.frman])>0))
RETURN
CALCULATE(MAX(Merge3[Merge2.cp01.frman]), FILTER(ALLEXCEPT(Merge3,Merge3[items.itnbr]), Merge3[Dates] = DataMax))
amitchandak
Super User
Super User

@Anonymous , Try a new column as

 


var _max= maxx(filter(Merge3, Merge3[items.nbr] =earlier(Merge3[items.nbr])),Merge3[Dates])
return
maxx(filter(Merge3, Merge3[items.nbr] =earlier(Merge3[items.nbr]) && Merge3[Dates]=_max ),Merge3[PRESSA_GUESSA])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.