Forum Discussion
dinosainsburys
Helper I
2 years agoHow do I get columns to append each other?
I get data via an API which is then presented in Power BI like this.
| Computer | RESULTS.DATE.0 | RESULTS.DATE.1 | RESULTS.VALUE.0 | RESULTS.VALUE.1 | RESULTS.VALUE.3 |
| COMP-4573 | 12/12/2023 | 13/12/2023 | 54638 | 5699 | 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
- Daniel29195
Community Champion
- dinosainsburys
Helper I
So using this table as an example:
Computer RESULTS.DATE.0 RESULTS.DATE.1 RESULTS.DATE.2 RESULTS.DATE.3 RESULTS.DATE3 COMP-4573 12/12/2023 13/12/2023 14/12/2023 15/12/2023 16/12/2023 COMP-4578 12/12/2023 13/12/2023 14/12/2023 15/12/2023 16/12/2023 xxxx xxxx xxxxx xxxx xxxx xxxx I want it to look like this:
Computer RESULTS.DATE.COMBINED RESULTS.DATE.1 RESULTS.DATE.2 RESULTS.DATE.3 RESULTS.DATE3 COMP-4573 12/12/2023 COMP-4578 13/12/2023 xxxx 14/12/2023 15/12/2023 16/12/2023 So essentially combining the columns into one.