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
confusedstudent
New Member

Need help for Custom Column Formula

I've got a column with mixture of figures (eg 2,000 and 2,000 - 5,000) and i'm suppose to calculate the average of that range (eg [2,000 + 5,000]/2 = 3,500). 

 

I've tried using delimiter to spilt the range and used custom column to calculate the average range. But my original solid figure of 2,000 doesn't appear in the new column column and it appeared as null?  

 

Is my formula for the custom column missing something? 

=([Figure.1]+[Figure.2])/2

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@confusedstudent 

try create a custom column

if [Figure 2] = null then [Figure 1] else ([Figure 1] + [Figure 2])/2

 


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

View solution in original post

6 REPLIES 6
az38
Community Champion
Community Champion

Hi @confusedstudent 

how is your data look like in data source?

 

and [2,000 + 5,000]/2 is equal 3500, not 4500, I think 🙂


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

Capture.PNG

@confusedstudent 

so, whats your business logic?

how do you want to calculate Figure_tidy if Figure2 is null?


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

@confusedstudent 

try create a custom column

if [Figure 2] = null then [Figure 1] else ([Figure 1] + [Figure 2])/2

 


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

It works! Thank you! 

I need to pop the 300,000 and 500,000 over to the Figure_Tidy Column. How could i do it? 

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.