Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello Everyone, I used a matrix to express a hierarchy data.
row area1 of matrix | row area2 of matrix | row area3 of matrix | row area4 of matrix | Value area |
CompanyName | stock price | stock amount | trade type | avg price |
companyA | 2.45 | 1000 | type1 | 1.76 |
| type2 | 2 | ||
| type3 | 2.5 | ||
companyB | 13.44 | 2000 | type1 | 12.55 |
typ2 | 12.1 | |||
type3 | 14.1 |
as we can see, top 4 columns belong company level, so they can be set into a row of matrix setting.
when I added the avg price to Value area of matrix, it will be separated by different rows.
Now I bulid a measure, which is be calucated by company level, but Matrix control could not support add this meaure to row area of matrix, so How do I add this kind of value into this matrix before [Trade type] column.
Thanks in advanced.
Solved! Go to Solution.
First, trade type has to move to the right of Company Name so what you want while possible can be finnicky. Second the solution is very similar to the links in my previous reply. Thrid, we don't have a sample data to work with. What you have posted is your expected output. https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
I answered similar posts yesterday.
https://community.fabric.microsoft.com/t5/Desktop/Matrix-Visual/m-p/4321736#M1353457
Thanks Danextian your advice, but I just want to get this kind of result. @danextian
CompanyName | stock price | stock amount | Measure | trade type | avg price |
companyA | 2.45 | 1000 | 20.16 | type1 | 1.76 |
type2 | 2 | ||||
type3 | 2.5 | ||||
companyB | 13.44 | 2000 | 45 | type1 | 12.55 |
typ2 | 12.1 | ||||
type3 | 14.1 | ||||
There is another measuer to calucte by company level. and it will be added in matrix before Trade type.
So any suggestion for it.
Thanks
Hi @Henry_Yang83 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.
In case if you have any resolution please do share that same with the community as it can be helpful to others.
Otherwise, will respond back with the more details and we will try to help.
we haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.
If our response addressed your query, please mark it as Accept Answer and click Yes if you found it helpful.
Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!
Hi @Henry_Yang83 ,
Since we haven’t heard back from you for a while, we are planning to close this ticket. If you have any further questions or need assistance in the future, please don’t hesitate to reach out by opening a new ticket in the Fabric Community.
Thank you for being an active part of our community we’re always here to help!
First, trade type has to move to the right of Company Name so what you want while possible can be finnicky. Second the solution is very similar to the links in my previous reply. Thrid, we don't have a sample data to work with. What you have posted is your expected output. https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Hi @Henry_Yang83 ,
It’s a bit hard to understand exactly what you’re trying to calculate without seeing the data itself, as you only provided a schematic of the final matrix. That said, if the goal is to control how a measure is displayed across hierarchy levels, you can use the ISINSCOPE function.
ISINSCOPE lets you check the current hierarchy level and decide what logic to apply. For example, you can show a specific value at one level (like CompanyName) and return a blank at other levels (like Trade Type).
Here’s an example:
If you want the Avg Price measure to appear only at the CompanyName level and leave the Trade Type level blank, you could write:
DAX
Copy code
Avg Price Display =
IF(
ISINSCOPE('YourTable'[Trade Type]),
BLANK(),
[Avg Price] -- Replace with your actual Avg Price measure
)
How it works:
ISINSCOPE('YourTable'[Trade Type]): Checks if the current level is Trade Type.
BLANK(): Returns blank when you’re at the Trade Type level, so no value is shown there.
[Avg Price]: Displays the average price at the CompanyName level (or wherever Trade Type is not in scope).
more information about the logic in the linked video :
https://www.youtube.com/watch?v=DtOfcsS_pQw&t=2s
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Thanks Ritaf, I just want to build a measure to calculate something by company level, it works, but this measure could not be added into row of matrix, so I have to find another way to instead of this measure way and show the value before the [trade type] column.
Hi again
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
no problem @Ritaf1983 let me describe it more detail.
Table 1 like below
CompanyName | stock price | stock amount | trade type | avg price |
companyA | 2.45 | 1000 | type1 | 1.76 |
companyA | 2.45 | 1000 | type2 | 2 |
companyA | 2.45 | 1000 | type3 | 2.5 |
companyB | 13.44 | 2000 | type1 | 12.55 |
companyB | 13.44 | 2000 | typ2 | 12.1 |
companyB | 13.44 | 2000 | type3 | 14.1 |
this part of data build a matrix, like I mentioned.
Table 2
Company | cost | date |
companyA | 45,000 | 2024-5-16 |
companyA | 32,000 | 2024-3-8 |
New measure comes from Table 2
Hi @Henry_Yang83 ,
Thanks for reaching out to the Microsoft Fabric Community forum.
@Ritaf1983 @danextian Thank you for the prompt response, please allow me to provide another insight:
Set Up Slicers: Add slicers for [Selected start Date] and [Selected End Date] to filter the measure dynamically.
Create a Measure for Cost_Period =
Cost_Period =
Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.
Thanks @v-aatheeque for your suggestion.
I need shows all trade type and related value rather than first one of them.
So I have to drag the trade type to row of matrix, and other value column in value of matrix.
this new measure currently just show the value of matrix, cause it is a kind of value.
but it is company level data, so it could not be under tradetype. so my quesiton is how to show it.
Thanks again
Hi @Henry_Yang83 ,
Could you please share the screenshots and the measures you have used for better assistance?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.