The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have a matrix which I have configured to maintain both parent- and child-level attributes (rather than aggregating). Sample:
Record ID | Title_Calc | Start Date_Calc | End Date_Calc |
Record A (here acting as parent) | Title A | 1/1/2025 | 1/8/2025 |
(Record A expanded) --> Record B (child of Record A) | Title B | 1/2/2025 | 1/3/2025 |
(Record A expanded) --> Record C (child of Record A) | Title C | 1/12/2025 | 1/20/2025 |
Record B (here acting as parent) | Title B | 1/2/2025 | 1/3/2025 |
Record C (here acting as parent) | Title C | 1/12/2025 | 1/20/2025 |
I am using the following measure formula to return the parent/child attributes for the Title, Start Date, and End Date:
Record ID | Title_Calc | Start Date_Calc | End Date_Calc | IsInDateRange_Calc |
Record A (here acting as parent) | Title A | 1/1/2025 | 1/8/2025 | 1 |
(Record A expanded) --> Record B (child of Record A) | Title B | 1/2/2025 | 1/3/2025 | 1 (correct, but not relevant since filter will be applied to parent-level) |
(Record A expanded) --> Record C (child of Record A) | Title C | 1/12/2025 | 1/20/2025 | 0 (correct, but not relevant since filter will be applied to parent-level) |
Record B (here acting as parent) | Title B | 1/2/2025 | 1/3/2025 | 1 |
Record C (here acting as parent) | Title C | 1/12/2025 | 1/20/2025 | 0 |
Any insight or guidance on this is greatly appreciated!
Solved! Go to Solution.
Hi @mollycat,
Based on your requirement, showing both parent and child together in the same matrix with dynamic filtering using measures is not fully supported in power bi as of now.
The issue here is power bi’s visual evaluation context does not handle dynamic row level switching (like for example using ISINSCOPE) when a measure is used as a visual level filter.
Even though the logic in the measure works correctly inside the matrix, the filtering behaves differently which causes unexpected filtering behaviour errors.
If this is a required, please follow below steps:
If this post helps in resolving the issue, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
Unfortunately, given my requirements, I still have yet to find a solution.
Hi @mollycat,
Based on your requirement, showing both parent and child together in the same matrix with dynamic filtering using measures is not fully supported in power bi as of now.
The issue here is power bi’s visual evaluation context does not handle dynamic row level switching (like for example using ISINSCOPE) when a measure is used as a visual level filter.
Even though the logic in the measure works correctly inside the matrix, the filtering behaves differently which causes unexpected filtering behaviour errors.
If this is a required, please follow below steps:
If this post helps in resolving the issue, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
Thank you @v-achippa, it is helpful to know that this functionality is not possible right now in Power BI. Using the Performance Analyzer, I had observed that the parent/child hierarchy is being flattened via SUMMARIZECOLUMNS, which is not allowing my Measure filter to work as intended, which aligns with what you've stated here regarding the dynamic row-level switching. I do appreciate the follow up to close the loop on this.
Use EVALUATEANDLOG and the DAXDebugOutput app to troubleshoot your measure. Make sure that what you are trying to achieve is what your report users need and understand.
I appreciate the reponse, but the measure is evaluating as expected, as indicated in the table. If I add the measure as a value in the matrix, the appropriate values are reflected. The issue arises when I try to apply the measure as a filter on the matrix.
Please provide sample data that covers your issue or question completely.
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...
I am having some trouble linking my pbix file to a cloud storage location...is this sufficient?
I have recreated the issue using the following 3 tables:
Data Table:
Record ID | Title | Start Date | End Date |
Record A | Title A | 1/1/2025 | 1/8/2025 |
Record B | Title B | 1/2/2025 | 1/3/2025 |
Record C | Title C | 1/12/2025 | 1/20/2025 |
Relationships Table:
Parent | Child |
Record A | Record B |
Record A | Record C |
Record B | null |
Record C | null |
The relationship is between the Data Table (Record ID) and the Relationships Table (Parent).
Calendar Table:
Unfortunately, this is not working any differently when applied as a filter than the original measure. The left matrix shows the Days In Range measure, showing the correct values (no filter applied). The right matrix shows the matrix with a filter applied (Days In Range > 0 OR is not blank - I've tried both with the same result). Record A is showing as expected, Record B is not included.
I really do appreciate the help on this...
I see in your file that the filter is working, but it is a bit different than my requirements. By changing the parent/child relationship, if I create a matrix in your attached pbix file, the implied hierarchy is not working as intended.
This is not the desired output:
Records B and C are standard records that have no children (or dependencies). They should be included in the list and then have no child records to expand.
Desired output:
Additionally, I see that in my sample file, the filter is working with this hierarchy if there are no other columns.
Working filter/matrix:
If the title is added, with no other changes, the filter stops working (Record B is removed):
Showing the same data twice in the same visual is a design red flag. I'm afraid I cannot support you with that.