We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I have a table called ProdInvc which has columns as product name, origin state, destination state, Quantity and amount. and another table which is just State that has State name. I need to make a matrix visual where in first column it is product name and then it should show Qty of each product based on origin and destination state (going across column)
Input
| ProdInvc | ||||
| P.Name | O Origin State | Destination State | Qty | Amount |
| A | x1 | z1 | 20 | 200 |
| b | y1 | w1 | 100 | 1000 |
| c | z1 | x1 | 1000 | 2000 |
| e | w1 | y1 | 300 | 2000 |
| f | x1 | z1 | 200 | 3000 |
| g | y1 | w1 | 43 | 200 |
| h | z1 | x1 | 200 | 1000 |
| i | w1 | y1 | 400 | 4000 |
| j | x1 | z1 | 400 | 5000 |
| k | y1 | z1 | 300 | 2000 |
| l | z1 | w1 | 200 | 3000 |
| m | w1 | x1 | 100 | 1000 |
| A | y1 | y1 | 1000 | 1000 |
| b | z1 | z1 | 300 | 2000 |
| c | w1 | w1 | 200 | 2000 |
| e | x1 | x1 | 43 | 3000 |
| f | y1 | y1 | 1000 | 200 |
| g | y1 | z1 | 300 | 1000 |
| h | z1 | w1 | 200 | 4000 |
| i | w1 | x1 | 43 | 1000 |
| j | x1 | y1 | 200 | 2000 |
| k | y1 | z1 | 43 | 2000 |
| l | y1 | w1 | 200 | 3000 |
| m | z1 | x1 | 400 | 200 |
| c | w1 | y1 | 400 | 1000 |
| e | x1 | z1 | 300 | 4000 |
| f | y1 | w1 | 200 | 2000 |
| State |
| x1 |
| y1 |
| z1 |
| w1 |
Output
If there is any other visual that satisfy the above criteria, I am open to suggestions.
Solved! Go to Solution.
Hi @learner03
To get the desired result you should unpivot the states columns with Power query.
Then you can create a matrix like this:
Pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @learner03
To get the desired result you should unpivot the states columns with Power query.
Then you can create a matrix like this:
Pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
@Ritaf1983 Thanks. How can I do conditional highlight based on each row by product in this situation like, if Max quantity in the row in destination belongs to same state and max quantity belong to state in origin then do not highlight otherwise highlight both max in both (destintion & origin)
example- max of product A is 1000 which belongs to y1 and max in origin is 1000which belongs to y1 so no highlight. Same for product B.
But for product C, Max in the destination is 1000 which belongs to x1 and max in origin is 1000 that belongs to Z1, so highlight both values here.
In G, Max in destination belongs to z1 which is 300 and max in origin belongs to y1 which is 343, so highlight both.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 54 | |
| 39 | |
| 33 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 62 | |
| 38 | |
| 34 | |
| 22 |