Forum Discussion
Matrix Table Transpose Rows represent column and Column represent Rows with multiple data type $,%
- 7 years ago
Hi NehaSha ,
Not sure how you have your data setup but if your matrix table looks like the first one you show, select the options on the matrix visual and go to values, then turn on the option Show on rows, the values that you have as values will appear in rows instead of columns.
Be aware that your Actual / PY column needs to be in columns and not on rows.
Regards,
MFelix
- 7 years ago
Hi NehaSha ,
Looking at your data maybe the best would be to make structural changes to your data in order to have it in a different shape. However I know that sometimes that is difficult to do because you already have a lot done in your work.
Let's create the following measures:
Net Rent = SUM(Power_Query[NetRentTY]) Gross pot = SUM(Power_Query[GrossPot]) Total Area = SUM(Power_Query[TotalArea]) Auction percentage% = IF ( SELECTEDVALUE( Power_Query[Type] ) = "Var Difference"; CALCULATE ( [Net Rent]/[Gross pot]; Power_Query[Type] = "Actual" ) - CALCULATE ( [Net Rent]/[Gross pot]; Power_Query[Type] = "LY" ); [Net Rent]/[Gross pot] )Now use this measures on your matrix and choose on the values options Show on Rows.
This will allow to select more than one value on your slicer for location.
Check PBIX file attach.
Regards,
MFelix
Hi MFelix ,
Thanks for your reply!
My bad I didnt give right example in previous email ! I thought it will be easy for me to get the data in matrix form but cant not replicate that.
But below is the real table example Query1 Represent
| NetRentTY | GrossPot | Auction Percentage | TotalArea | LocationID |
| $500,000 | $510,550 | 39% | 1000 | 1 |
Query2 Represent
| NetRentLY | GrossPotLY | Auction PercentageLY | TotalAreaLY | LocationID |
| $410,550 | $413,000 | 20% | 900.08 | 1 |
Need Result:
| Actual | LY | |
| NetRent | $500,000 | $410,550 |
| GrossPot | $510,550 | $413000 |
| Auction Percentage | 39% | 20% |
| TotalArea | 1,000 | 900.08 |
Please help with this real scenario !
Thanks,
Neha
Hi NehaSha ,
You can add a column to each table refering to Category (Acctual / PY), then rename the columns on both table to the same name and make an append of the data into a single table, then you can use the solution I gave.
Regards,
MFelix
- NehaSha7 years ago
Helper II
Thank You very much! it worked !
- NehaSha7 years ago
Helper II
Hi MFelix ,
Need your help for the below mentioned scenario !
I need to show difference column next to LY Column, I can easily add subtotal but how to get the difference Actual-LY
Actual LY Difference NetRentTY $500,000 $410,550 $89,450 GrossPot $510,550 $430,000 $80,550 Auction Percentage 39% 40% -1% TotalArea 1000 900.08 99.92 Thanks,
Neha
- MFelix7 years ago
Super User
Hi NehaSha ,
Can you please confirm how you data looks like currenctly? You have one line for actuals and another for PY?
Regards,
MFelix
- NehaSha7 years ago
Helper II
Hi MFelix
Please see the below mentioned :
Query1
NetRentTY
GrossPot
Auction Percentage
TotalArea
LocationID
$500,000
$510,550
39%
1000
1
Query2
NetRentLY
GrossPotLY
Auction PercentageLY
TotalAreaLY
LocationID
$410,550
$413,000
20%
900.08
1
After found the solution provided by you, able to achieve the below mentioned Expected Result,
Currently data look like below mentioned:
Actual
LY
NetRent
$500,000
$410,550
GrossPot
$510,550
$413000
Auction Percentage
39%
20%
TotalArea
1,000
900.08
Need to add one more column for Difference:
Actual
LY
Difference
NetRentTY
$500,000
$410,550
$89,450
GrossPot
$510,550
$430,000
$80,550
Auction Percentage
39%
40%
-1%
TotalArea
1000
900.08
99.92
Thanks,
Neha