Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Case 964 How to recode GROUP_TYPE to SAL_C ?

Hi All

 

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

 

My expected result in Yellow color :-

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

 

 

  • Anonymous , Check like

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

6 Replies

  • Anonymous , Check like

    New Column = MAXX(filter('TABLE', 'TABLE'[G_TYPE]= earlier('TABLE'[G_TYPE])),[SAL_C])
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Amit

      Thank you very much , it work fine now.

      Paul 

  • FarhanAhmed's avatar
    FarhanAhmed
    Icon for Community Champion rankCommunity 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]

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi sir

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

       

      • FarhanAhmed's avatar
        FarhanAhmed
        Icon for Community Champion rankCommunity Champion

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

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

     

    New G_TYPE= "G" & Table[G_TYPE]