Forum Discussion

gb00th's avatar
gb00th
New Member
4 years ago
Solved

Table Manipulation

I have a table of data that comprises

IDResponseLabel
1LocationUK
2LocationGermany
3LocationFrance
1ProjectA
2ProjectB
3ProjectC

 

How can I either generate new columns, or manipulate this table to produce the following:

IDLocationProject
1UKA
2GermanyB
3FranceC

 

I'm convinced there's an easy way, but I cannot find the way to get there. Help please?

 

 

  • gb00th 

    Table 2 = 
    ADDCOLUMNS(
        VALUES('Table'[ID]),
        "Location", CONCATENATEX(FILTER('Table', 'Table'[ID] = EARLIER('Table'[ID]) && 'Table'[Response] = "Location"),'Table'[Label]),
        "Project", CONCATENATEX(FILTER('Table', 'Table'[ID] = EARLIER('Table'[ID]) && 'Table'[Response] = "Project"),'Table'[Label])
    ) 


    In case it answered your question please mark this as a solution for community visibility. Appreciate Your Kudos 🙂

1 Reply

  • SpartaBI's avatar
    SpartaBI
    Community Champion

    gb00th 

    Table 2 = 
    ADDCOLUMNS(
        VALUES('Table'[ID]),
        "Location", CONCATENATEX(FILTER('Table', 'Table'[ID] = EARLIER('Table'[ID]) && 'Table'[Response] = "Location"),'Table'[Label]),
        "Project", CONCATENATEX(FILTER('Table', 'Table'[ID] = EARLIER('Table'[ID]) && 'Table'[Response] = "Project"),'Table'[Label])
    ) 


    In case it answered your question please mark this as a solution for community visibility. Appreciate Your Kudos 🙂