Forum Discussion
Matrix
- 1 year ago
Hi wwenw1,
Thanks for reaching out to the Microsoft fabric community forum.
To show values in a Power BI matrix only when a user expands to a lower-level detail, you can use the ISINSCOPE() function inside a measure to dynamically control visibility.
If your hierarchy is Category → Subcategory → Product, and you want values to appear only at the Product level.
Here is the DAX : Visible Sales
IF (
ISINSCOPE(SalesData[Product]),
SUM(SalesData[Sales]),
BLANK()
)Use this measure in the matrix’s Values field instead of the raw sales column. This will ensure that higher levels (Category and Subcategory) show blank values when collapsed, and only show data when the user drills down to Product.
If you instead want values to be shown at both the Subcategory and Product levels, you can modify the measure like this:
Here is the DAX : Visible Sales Alt
IF (
ISINSCOPE(SalesData[Subcategory]) || ISINSCOPE(SalesData[Product]),
SUM(SalesData[Sales]),
BLANK()
)Please find the attached pbix file for your reference.
If the response has addressed your query, please "Accept it as a solution" and give a 'Kudos' so other members can easily find it.
Best Regards,
Tejaswi.
Community Support
Hi wwenw1 ,
I hope the information provided has been useful. Please let me know if you need further clarification or would like to continue the discussion.
If your question has been answered, please “Accept as Solution” and Give “Kudos” so others with similar issues can easily find the resolution.
Thank you.
Tejaswi
Hi wwenw1,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
If the response answered your query, kindly “Accept as Solution” and Give “Kudos” to help others in the community benefit from it as well.
Thank you.
Tejaswi