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

Ignore Empty | Blank Cells in Uploaded Column

Hi Expert

 

Need to amend the following calculated column measure to ignore where we have a empty cell in Uploaded column in the table

Period =
VAR p=find("P",'Table'[Uploaded],1)
return MID('Table'[Uploaded],p+1,100)*1
 
Currently this is returning an error when the first rows are blank..
1 ACCEPTED SOLUTION

Hi @Anonymous ,

You can update your calculated column [Period] as below:

Period = 
VAR p =
     IFERROR ( FIND ( "P", 'Table'[Uploaded], 1 ), 0 ) 
RETURN
    IF ( p = 0, BLANK (), MID ( 'Table'[Uploaded], p + 1, 100 ) * 1 )

yingyinr_0-1639117310697.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous ,

 

Period =
VAR p=find("P",'Table'[Uploaded],1)
return if(not(isblank('Table'[Uploaded])) , MID('Table'[Uploaded],p+1,100)*1 , blank())

Anonymous
Not applicable

Hi amit - Smaple data is here https://community.powerbi.com/t5/Desktop/Sum-of-previous-Periods-Grouped/m-p/2225491#M812064

 

the above formula is giving me an error "the search text provided to function "Find" could not be found in the given text"

Hi @Anonymous ,

You can update your calculated column [Period] as below:

Period = 
VAR p =
     IFERROR ( FIND ( "P", 'Table'[Uploaded], 1 ), 0 ) 
RETURN
    IF ( p = 0, BLANK (), MID ( 'Table'[Uploaded], p + 1, 100 ) * 1 )

yingyinr_0-1639117310697.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.