Forum Discussion
NickTeam17
6 years agoFrequent Visitor
Calculating differences between multiple columns and then the median of these values
Hi I have been asked to calculate the following three stage exercise: Calculate the differences between the weekly data in the table below Calculate the median of those weekly differences for a ...
- 6 years agoNickTeam17
I suggest you unpivot this data, which is done in the Power Query Editor.
So to make it as dynamic as possible select all the columns that are NOT weeks, then select Unpivot Other Columns..
Then you will have two columns: Attribute and Value. Rename Attribute to Week Number and Value to whatever you want.
When you've got that under control, come back and see us if you need more help with calculating the average, difference and filtering by week, but this will be more straightforward once it's in columns.
https://radacad.com/pivot-and-unpivot-with-power-bi
AllisonKennedy
6 years agoCommunity Champion
NickTeam17
I suggest you unpivot this data, which is done in the Power Query Editor.
So to make it as dynamic as possible select all the columns that are NOT weeks, then select Unpivot Other Columns..
Then you will have two columns: Attribute and Value. Rename Attribute to Week Number and Value to whatever you want.
When you've got that under control, come back and see us if you need more help with calculating the average, difference and filtering by week, but this will be more straightforward once it's in columns.
https://radacad.com/pivot-and-unpivot-with-power-bi
I suggest you unpivot this data, which is done in the Power Query Editor.
So to make it as dynamic as possible select all the columns that are NOT weeks, then select Unpivot Other Columns..
Then you will have two columns: Attribute and Value. Rename Attribute to Week Number and Value to whatever you want.
When you've got that under control, come back and see us if you need more help with calculating the average, difference and filtering by week, but this will be more straightforward once it's in columns.
https://radacad.com/pivot-and-unpivot-with-power-bi