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
Paulyeo11
Impactful Individual
Impactful Individual

Case 964 How to recode GROUP_TYPE to SAL_C ?

Hi All

 

I al still struggle on how to recode GROUP TYPE to Staff.

 

Paulyeo11_0-1604378866416.png

My expected result in Yellow color :-

Paulyeo11_1-1604378965195.png

Some one have give me the script below :-

New Column = calculate(firstnonblank('TABLE'[SAL_C], blank()), filter('TABLE', 'TABLE'[G_TYPE]= earlier('TABLE'[G_TYPE])))
My PBI file :-
 
Hope some one can share with me where go wrong ?
 
Paul Yeo

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Paulyeo11 , Check like

New Column = MAXX(filter('TABLE', 'TABLE'[G_TYPE]= earlier('TABLE'[G_TYPE])),[SAL_C])

View solution in original post

6 REPLIES 6
niteshtrehan89
Helper III
Helper III

first change the G_TYPE to text and then create a calculated column

 

New G_TYPE= "G" & Table[G_TYPE]

amitchandak
Super User
Super User

@Paulyeo11 , Check like

New Column = MAXX(filter('TABLE', 'TABLE'[G_TYPE]= earlier('TABLE'[G_TYPE])),[SAL_C])

Hi Amit

Thank you very much , it work fine now.

Paul 

FarhanAhmed
Community Champion
Community Champion

just thinking If G_TYPE is the same number coming after SALC "G" then why not create a new calculated column

 

something like

 

New SAL_C= "G" & Table[G_TYPE]







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Hi sir

I try your expression , and using auto fill i still get error.

Paulyeo11_0-1604380481614.png

 

the data type for this column should be Text instead of Whole Number.







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




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.