Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Case 969 How to recode GROUP_TYPE to GROUP CLASS ?

Hi All

 

I got the Script from Amit :-

 

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

 

it work fine on my sample data file , when i apply to my actual data file  , the result is wrong :-

 

Hope some one can share with me where go wrong ?

 

Below is my PBI file :-

 

https://www.dropbox.com/s/i3ekhyodr5lvjgz/SI_TDS_V030.pbix?dl=0

 

Paul 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

    Please update the formula of calculated column [New Column_] as below:

    New Column_ =
    IF (
        ISBLANK ( 'SALES'[SAL_C] )
            || TRIM ( 'SALES'[SAL_C] ) = "",
        CONCATENATE ( "G", 'SALES'[G_TYPE] ),
        'SALES'[SAL_C]
    )

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

     

10 Replies

  • Anonymous , which table is this in the shared file, Hope you created a column

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Amit

      it is at SALES Table , Field name = STAFF 

       

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Anonymous , can please check the uploaded file once. Not able to find