Forum Discussion

mariakos's avatar
mariakos
New Member
1 year ago
Solved

Data shaping

Hi,

 

I need some help shaping the data in the table below:

 

I have 2 issues as described below:

Problem 1: Reordering Columns
Label Definitions: Columns labeled 1, 2, and 3 correspond to year, country, and topics, respectively. I need assistance rearranging these columns to reflect this logical order. Alternatively, this could be addressed by creating a reference table, such as I've seen with date tables, to map the labels accordingly. 
Standardising: Ensure that all columns have consistent headers (e.g., "year," "country," "topics").


Problem 2: Separating Multiple Values
Rows with multiple values (e.g., FR, NO, DE under the label 'country') need to be organised so that each value is listed separately under 'country,' allowing for the selection of individual values like FR for visualisation purposes

Mapping to column headers: Ensure values are assigned to their appropriate logical column headers.

Looking forward to hearing from you and your possible solutions to my issues. Thank you 🙂

ImpressionsReach avg.FrequencyEngagementsEngagement rateCTR         
612037501,63961,5711,671. 20243. Employer Branding2. DE      
247317451,42602,432,67         
295822381,32240,8127,351. 2024 2. DE3. Financial Reporting     
10456691,56222,112,681. 2024   2. FR    
204013471,51442,163,481. 2024    3. Press release2. IT  
324422051,47611,882,51. 2024      2. ES 
374927441,37872,322,161. 2024  3. Financial Reporting    2. NO
34656265211,313551,0219,02         
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi mariakos,

     

    Translate the data in power query, rename column 1,2,3 to year, country and topics first:

    Then split the country column with multiple values with delimiter:

    In my test, I used a comma as the delimiter, and you can choose a different delimiter if needed.

    Before:

    Later:

    Best regards,

    Joyce

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mariakos,

     

    Translate the data in power query, rename column 1,2,3 to year, country and topics first:

    Then split the country column with multiple values with delimiter:

    In my test, I used a comma as the delimiter, and you can choose a different delimiter if needed.

    Before:

    Later:

    Best regards,

    Joyce

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

  • Thank you for your help. Sorry for the delay in my response. I was away and had limited access to the internet. 
    The data doesn't feed into Power BI clearly like you have interpreted it with column 1, column 2 and column 3.  Each data input is labelled with either 1, 2 or 3 (not the columns -which are more than 3). These are also not ordered from 1-3 as you can see in the image but scattered throughout more than 3 columns across the data input.  Is there a way to structure this? 
    Thank you Maria