March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi all,
My problem is I have a "Transaction" table like this:
anđ the dimension table like this
What can I do to create a matrix like this:
This is just a simplification of my data, it have a lot of rows so I don't want to split the "Transaction Table" into 2 and Union it
Is there any way to get this matrix most effectively ?
Thank you in advance.
Solved! Go to Solution.
Hi @kidpk111 ,
Here are the steps you can follow:
1. In Power Query – select [Revenue Type] and [Cost Type] Transform – Unpivot Columns.
Result:
2. Join the relationship between two tables.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @kidpk111 ,
Here are the steps you can follow:
1. In Power Query – select [Revenue Type] and [Cost Type] Transform – Unpivot Columns.
Result:
2. Join the relationship between two tables.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you for your answer, it work but it will duplicate may data and since my data is a lot it kinda reduce my performance
@kidpk111 , Duplicate the column Type of dimension table in power query and the use text before delimiters
Text Before Delimiter and Text After Delimiter: https://youtu.be/oGY4RoPKDOE
You can this new column on the column of matrix visual
or create measures like
Revenue =
calculate(Sum(Fact[Values]), filter(Dim, containsstring(Dim[Type] , "Revenue") ) )
cost =
calculate(Sum(Fact[Values]), filter(Dim, containsstring(Dim[Type] , "cost ") ) )
Thank you for your answer, but it still cant answer my question.
How can you create the relationship for this to work when you have a new column which contain only "Revenue" and "Cost" it need the correct relationship in order to put it into the matrix table. I can only create 1 relationship which is the Type from dim table to either Revenue Type or Cost Type I tried to use the function Userelationship() but It don't have the right number.
Can you help me with this ?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
116 | |
83 | |
77 | |
66 | |
57 |
User | Count |
---|---|
130 | |
111 | |
97 | |
78 | |
75 |