Forum Discussion
combine columns for pie chart
- 9 years ago
Hi jgoodwin10,
You can refer to the below steps to get the desired results:
1. You need to unpivot the first table to get all muscles (primary, secondary and trinary) in a column
- Go to query editor mode and select the primary, secondary and trinary muscle column and click unpivot in transform tab
- Post this you will have 3 columns Exercise, Attributes (consist primary, secondary and trinary in rows) and values (Consist muscle in rows)
- Close and apply the changes
2. Now you have to create a DIM table which will help you create the relation between new unpivoted table
- you can use the distinct function for that
New table = DISTINCT(Exercise)
3. Create relation ship between all three tables using Exercise column
- Going forward using Excersing column from Dim table and use Value column (from unpivoted column) in pie chart
Hope this helps :)
-Sumit
Hi jgoodwin10,
You can refer to the below steps to get the desired results:
1. You need to unpivot the first table to get all muscles (primary, secondary and trinary) in a column
- Go to query editor mode and select the primary, secondary and trinary muscle column and click unpivot in transform tab
- Post this you will have 3 columns Exercise, Attributes (consist primary, secondary and trinary in rows) and values (Consist muscle in rows)
- Close and apply the changes
2. Now you have to create a DIM table which will help you create the relation between new unpivoted table
- you can use the distinct function for that
New table = DISTINCT(Exercise)
3. Create relation ship between all three tables using Exercise column
- Going forward using Excersing column from Dim table and use Value column (from unpivoted column) in pie chart
Hope this helps :)
-Sumit
Worked like a charm!
Thank you very much!