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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.