Forum Discussion
Anonymous
3 years agoNot applicable
Transform some rows into a new column
Hello,
I have a table with the following structure:
| Year_Month | Type | Value |
| 2023.01 | Production | 5 |
| 2023.01 | Production_Target | 7 |
| 2023.01 | Compliance | 8 |
| 2023.01 | Compliance_Target | 8 |
| 2023.02 | Production | 10 |
| 2023.02 | Production_Target | 12 |
| 2023.02 | Compliance | 4 |
| 2023.02 | Compliance_Target | 6 |
| 2023.03 | Production | 15 |
| 2023.03 | Production_Target | 13 |
| 2023.03 | Compliance | 11 |
| 2023.03 | Compliance_Target | 12 |
Rows where the Type column has the value "_Target" indicate that they are rows with target values for the respective Indicator Type (for example, the type "Production" is the actual production value for each month and the "Production-Target" is the expected value for each month). I want to create charts for each Type that show the actual value for each month and a goal line (which shows the "_Target" values for each month), but I'm not able to turn this table into a better way.
My expected table result would be this:
| Year_Month | Type | Value | Objective |
| 2023.01 | Production | 5 | 7 |
| 2023.02 | Production | 10 | 12 |
| 2023.03 | Production | 15 | 13 |
| 2023.01 | Compliance | 8 | 8 |
| 2023.02 | Compliance | 4 | 6 |
| 2023.03 | Compliance | 11 | 12 |
3 Replies
- Ashish_Mathur
Super User
- AnonymousNot applicable
Amazing, Ashish_Mathur !!
This worked very well!! Thanks a lot!- Ashish_Mathur
Super User
You are welcome.