Forum Discussion

IbrahimHakim's avatar
IbrahimHakim
Regular Visitor
4 years ago
Solved

count text values in columns

Please I need your help on this, I have a column of text which I splitted to form 29 resulting columns. So want now to create a measure which will count the the text values in all the columns. Thanks in advance
  • Hi IbrahimHakim ,

     

    1. You can create the custom column in Power Query.

     

    = List.Count(List.Select( List.Skip( Record.ToList(_),1), each _ <> null and _ <> ""))

     

    2. Create a measure.

    • Select [Job Posting ID] column, then unpivot other columns.

    • Create the measure.
    Measure = CALCULATE ( COUNT ( 'Table (2)'[Value] ), 'Table (2)'[Value] <> BLANK () )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

6 Replies

  • Hi IbrahimHakim 

     

    Please provide sample data or preferably your file, and an exampel of the result you are after.  Really hard to help without this.

     

    regards

     

    Phil

  • Hello. 

    Please I have a table made up of job posting IDs and job skills. I further splitted the job skills column so it may be easy to count for each skill. How can I count the values of each  skill while keeping the posting IDs intact. The column I splitted have text like ('excel','python', 'r', 'sas') for each posting ID. how will I count for each skill in the resulting columns.

    • jdbuchanan71's avatar
      jdbuchanan71
      Super User

      Hi IbrahimHakim 

      It's not really clear what you are looking for.  Please post a sample of your data in text format (not a screeen shot) in a table and show the desired result as well.

    • superveryjoyce's avatar
      superveryjoyce
      New Member

      Hey I have the same question as you have, did you solve it and would you mind sharing how you solve the problem?

       

      Thanks

  • this is the sample table

     

    This is the sample table. the table was obtained after I splitted a single column with text data like ('python' , 'excel' , 'r'). Now I need to create a measure which counts each skill per a posting id. Thanks in advance

  • v-kkf-msft's avatar
    v-kkf-msft
    Community Support

    Hi IbrahimHakim ,

     

    1. You can create the custom column in Power Query.

     

    = List.Count(List.Select( List.Skip( Record.ToList(_),1), each _ <> null and _ <> ""))

     

    2. Create a measure.

    • Select [Job Posting ID] column, then unpivot other columns.

    • Create the measure.
    Measure = CALCULATE ( COUNT ( 'Table (2)'[Value] ), 'Table (2)'[Value] <> BLANK () )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.