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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Help WIth Moving FIRST NONBLANKROWS from 1 Column to another

Greeting my fellow user,

From my table called Data, I currently trying to insert the first nonblank value from START to the same row as the firstnonblank value from FINISH which at the column RESULT. There are thousands of REQUEST NO. with multiple START and FINISH date inside each REQUEST NO. and also with different amount of space for each first nonblank value of START and FINISH.

I tried using 
RESULT = IF( 'DATA'[FINISH] <> BLANK(),
                 CALCULATE(FIRSTNONBLANK('DATA'[START], 1), ALLEXCEPT('DATA', 'DATA'[RANK])),

                 BLANK() )

 

But to no avail. Would appreciate every feedback given for this problem. 
 

Thanks for reading my question!

 

REQUEST NO.RANKSTARTFINISHRESULT
193808412/2/2020  
19380841   
19380841   
19380842 3/2/20202/2/2020
19380842   
193808434/2/2020  
19380844 10/2/20204/2/2020
19380844   
19380844   

 

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@Anonymous 

maybe column like this

RESULT_COL = 
var _lastFinish = CALCULATE(MAX(DATA[FINISH]),FILTER(ALLSELECTED(DATA),DATA[FINISH]<EARLIER(DATA[FINISH])))
RETURN
IF(DATA[FINISH] <> BLANK(), CALCULATE(FIRSTNONBLANK(DATA[START],1),FILTER(ALLSELECTED(DATA),DATA[START]>_lastFinish)), BLANK())

but be carefull with FIRSTNONBLANK as it returns first value as it stored and not mandatory it is the same with what you see


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

11 REPLIES 11

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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