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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
pathakpeeyush
Helper I
Helper I

fill column value based on value in another column

I am having following table, I want the 'Value' column to be filled for VCF and VCT based on Value of VCL where SO,BN and MV is same for VCL,VCF and VCT.

NameCol1SOBNMNValue
VCL544911315906C721578EMS6108005ENA1
VCF204811315906C721578EMS6108005EN 
VCT274511315906C721578EMS6108005EN 
VCF637411327179C721578GMS9666005EN 
VCT204811327179C721578GMS9666005EN 
VCL176511327179C721578GMS9666005ENA2

 The output table should be 

NameCol1SOBNMNValue
VCL544911315906C721578EMS6108005ENA1
VCF204811315906C721578EMS6108005ENA1
VCT274511315906C721578EMS6108005ENA1
VCF637411327179C721578GMS9666005ENA2
VCT204811327179C721578GMS9666005ENA2
VCL176511327179C721578GMS9666005ENA2

 

experts, please help me on this. @amitchandak@parry2k 

1 ACCEPTED SOLUTION

Hi, @pathakpeeyush 

Your column type is "text", I would suggest you to use [Value]=" "   to replace isblank([Value]

So please change your formula of calculated column as below:

 

Value2 = if([Value]="",MAXX(FILTER('Table','Table'[MN]=EARLIER('Table'[MN])),[Value]),[Value]) 

 

34.png

Best Regards,
Community Support Team _ Eason
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

4 REPLIES 4
amitchandak
Super User
Super User

@pathakpeeyush , Try a new column like

 

if(isblank([Value]),maxx(filter([MN] =earlier([MN]) && not(isblank([Value]))),[Value]),[Value])

I tried this insted- 

if(isblank([Value]),MAXX(FILTER('Table','Table'[MN]=EARLIER('Table'[MN])),[Value]),[Value]) 
 
but it's returning a new columns with same data in Value column.

Hi, @pathakpeeyush 

Your column type is "text", I would suggest you to use [Value]=" "   to replace isblank([Value]

So please change your formula of calculated column as below:

 

Value2 = if([Value]="",MAXX(FILTER('Table','Table'[MN]=EARLIER('Table'[MN])),[Value]),[Value]) 

 

34.png

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

Thanks for responding. It's showing error msg as- Too few arguments were passed to the FILTER function. The minimum argument count for the function is 2.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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