Maxtrix - How to move columns to rows
up vote
1
down vote
favorite
I have a Maxtrix that looks as follows:
And the Visualizations pane looks as follows:
Sales, COGS, GP and GP% are fields in a dataset. The YearMonth field is a field from another dataset.
What I want is for Sales, COGS, GP and GP% to be rows and my only column should be year-month. So I would have a row for Sales and totals for each year and month. And then another row for COGS and totals for each year and month etc. I can't find an easy way to do this because Sales, COGS, GP etc. are not like categories contained in another dataset, linked to this dataset that I could drag to Rows in the Visualization tab.
powerbi
add a comment |
up vote
1
down vote
favorite
I have a Maxtrix that looks as follows:
And the Visualizations pane looks as follows:
Sales, COGS, GP and GP% are fields in a dataset. The YearMonth field is a field from another dataset.
What I want is for Sales, COGS, GP and GP% to be rows and my only column should be year-month. So I would have a row for Sales and totals for each year and month. And then another row for COGS and totals for each year and month etc. I can't find an easy way to do this because Sales, COGS, GP etc. are not like categories contained in another dataset, linked to this dataset that I could drag to Rows in the Visualization tab.
powerbi
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a Maxtrix that looks as follows:
And the Visualizations pane looks as follows:
Sales, COGS, GP and GP% are fields in a dataset. The YearMonth field is a field from another dataset.
What I want is for Sales, COGS, GP and GP% to be rows and my only column should be year-month. So I would have a row for Sales and totals for each year and month. And then another row for COGS and totals for each year and month etc. I can't find an easy way to do this because Sales, COGS, GP etc. are not like categories contained in another dataset, linked to this dataset that I could drag to Rows in the Visualization tab.
powerbi
I have a Maxtrix that looks as follows:
And the Visualizations pane looks as follows:
Sales, COGS, GP and GP% are fields in a dataset. The YearMonth field is a field from another dataset.
What I want is for Sales, COGS, GP and GP% to be rows and my only column should be year-month. So I would have a row for Sales and totals for each year and month. And then another row for COGS and totals for each year and month etc. I can't find an easy way to do this because Sales, COGS, GP etc. are not like categories contained in another dataset, linked to this dataset that I could drag to Rows in the Visualization tab.
powerbi
powerbi
asked Nov 10 at 14:56
Randy Minder
29.6k36142253
29.6k36142253
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
There is a setting for this. Go to the Format tab and turn on 'Show on rows' under the Values section.
Fan freakin' tastic. This is exactly what I was looking for.
– Randy Minder
Nov 12 at 18:08
add a comment |
up vote
0
down vote
I would first create a table using Enter Data e.g. All Measures containing 1 column (e.g. Measure Name) and 4 rows, containing Sales , COGS , GP, GP%.
Then I would create a Measure using the SWITCH function, e.g.
Any Measure = SWITCH ( 'All Measures'[Measure Name] , "Sales" , [Sales] ,"COGS", [COGS] , "GP" , [GP] , "GP%" , [GP%] )
Then I would add 'All Measures'[Measure Name] to the Rows well, and replace the Values well with Any Measure.
You may need to enhance that to get the numeric formats right, e.g. by wrapping each measure reference in a FORMAT function.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
There is a setting for this. Go to the Format tab and turn on 'Show on rows' under the Values section.
Fan freakin' tastic. This is exactly what I was looking for.
– Randy Minder
Nov 12 at 18:08
add a comment |
up vote
2
down vote
accepted
There is a setting for this. Go to the Format tab and turn on 'Show on rows' under the Values section.
Fan freakin' tastic. This is exactly what I was looking for.
– Randy Minder
Nov 12 at 18:08
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
There is a setting for this. Go to the Format tab and turn on 'Show on rows' under the Values section.
There is a setting for this. Go to the Format tab and turn on 'Show on rows' under the Values section.
answered Nov 12 at 16:43
Alexis Olson
11.3k21633
11.3k21633
Fan freakin' tastic. This is exactly what I was looking for.
– Randy Minder
Nov 12 at 18:08
add a comment |
Fan freakin' tastic. This is exactly what I was looking for.
– Randy Minder
Nov 12 at 18:08
Fan freakin' tastic. This is exactly what I was looking for.
– Randy Minder
Nov 12 at 18:08
Fan freakin' tastic. This is exactly what I was looking for.
– Randy Minder
Nov 12 at 18:08
add a comment |
up vote
0
down vote
I would first create a table using Enter Data e.g. All Measures containing 1 column (e.g. Measure Name) and 4 rows, containing Sales , COGS , GP, GP%.
Then I would create a Measure using the SWITCH function, e.g.
Any Measure = SWITCH ( 'All Measures'[Measure Name] , "Sales" , [Sales] ,"COGS", [COGS] , "GP" , [GP] , "GP%" , [GP%] )
Then I would add 'All Measures'[Measure Name] to the Rows well, and replace the Values well with Any Measure.
You may need to enhance that to get the numeric formats right, e.g. by wrapping each measure reference in a FORMAT function.
add a comment |
up vote
0
down vote
I would first create a table using Enter Data e.g. All Measures containing 1 column (e.g. Measure Name) and 4 rows, containing Sales , COGS , GP, GP%.
Then I would create a Measure using the SWITCH function, e.g.
Any Measure = SWITCH ( 'All Measures'[Measure Name] , "Sales" , [Sales] ,"COGS", [COGS] , "GP" , [GP] , "GP%" , [GP%] )
Then I would add 'All Measures'[Measure Name] to the Rows well, and replace the Values well with Any Measure.
You may need to enhance that to get the numeric formats right, e.g. by wrapping each measure reference in a FORMAT function.
add a comment |
up vote
0
down vote
up vote
0
down vote
I would first create a table using Enter Data e.g. All Measures containing 1 column (e.g. Measure Name) and 4 rows, containing Sales , COGS , GP, GP%.
Then I would create a Measure using the SWITCH function, e.g.
Any Measure = SWITCH ( 'All Measures'[Measure Name] , "Sales" , [Sales] ,"COGS", [COGS] , "GP" , [GP] , "GP%" , [GP%] )
Then I would add 'All Measures'[Measure Name] to the Rows well, and replace the Values well with Any Measure.
You may need to enhance that to get the numeric formats right, e.g. by wrapping each measure reference in a FORMAT function.
I would first create a table using Enter Data e.g. All Measures containing 1 column (e.g. Measure Name) and 4 rows, containing Sales , COGS , GP, GP%.
Then I would create a Measure using the SWITCH function, e.g.
Any Measure = SWITCH ( 'All Measures'[Measure Name] , "Sales" , [Sales] ,"COGS", [COGS] , "GP" , [GP] , "GP%" , [GP%] )
Then I would add 'All Measures'[Measure Name] to the Rows well, and replace the Values well with Any Measure.
You may need to enhance that to get the numeric formats right, e.g. by wrapping each measure reference in a FORMAT function.
answered Nov 12 at 0:37
Mike Honey
11.3k11328
11.3k11328
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53240150%2fmaxtrix-how-to-move-columns-to-rows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown