Forum Discussion

dinosainsburys's avatar
2 years ago

How do I get columns to append each other?

I get data via an API which is then presented in Power BI like this.

 

ComputerRESULTS.DATE.0RESULTS.DATE.1RESULTS.VALUE.0RESULTS.VALUE.1RESULTS.VALUE.3
COMP-457312/12/202313/12/2023546385699

5788

 

The results.date will correspond to their results.value counterparts as shown in the example below. In order for PBI to show a timeline, the Date column needs to be in one, with the coulmns appending each other and repeating the subsequent column to the left. I thought I could do this with unpivotting but it completey messes up the format of the table and thus the values are no represenative to their corresponding Computer cell or entry. 

 

How can I get the columns to just append each other?

2 Replies

    • dinosainsburys's avatar
      dinosainsburys
      Icon for Helper I rankHelper I

      So using this table as an example:

       

       

      ComputerRESULTS.DATE.0RESULTS.DATE.1RESULTS.DATE.2RESULTS.DATE.3RESULTS.DATE3
      COMP-457312/12/202313/12/202314/12/202315/12/202316/12/2023
      COMP-457812/12/202313/12/2023 14/12/202315/12/2023 16/12/2023
      xxxxxxxxxxxxxxxxxxxxxxxxx

       

      I want it to look like this:

       

       

      ComputerRESULTS.DATE.COMBINEDRESULTS.DATE.1RESULTS.DATE.2RESULTS.DATE.3RESULTS.DATE3
      COMP-457312/12/2023    
      COMP-457813/12/2023    
      xxxx14/12/2023    
       15/12/2023    
       16/12/2023    

       

      So essentially combining the columns into one.