Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
SoftDev
Regular Visitor

Display parent data field when child is blank

Hello!

 

I want to create a dynamic filter where I can display by default only Business applications where Properties_System is not null, but by changing other filter show only Business applications where Properties_System is null.

Table A(Business application) one to many table B(Properties_System)

Other filter with options like Active, Inactive and All.

Is it possible?

And how can I do it?

sampledatafields.PNG

4 REPLIES 4
v-jianboli-msft
Community Support
Community Support

Hi @SoftDev ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1668674280534.png

vjianbolimsft_1-1668674291349.png

Please try:

Measure =
VAR _a =
    SUMMARIZE (
        FILTER ( ALL ( 'appEvents TEST' ), [ID] = MAX ( 'recources TEST'[ID] ) ),
        [Properties_System]
    )
VAR _b =
    MINX ( _a, [Properties_System] )
RETURN
    SWITCH (
        TRUE (),
        _b <> BLANK ()
            && NOT ( ISFILTERED ( 'Status table'[Status] ) ), 1,
        _b = BLANK ()
            && ISFILTERED ( 'Status table'[Status] ), 1
    )

Apply it to the visual level filter:

vjianbolimsft_2-1668674384305.png

Final output:

vjianbolimsft_3-1668674399509.png

vjianbolimsft_4-1668674409560.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for trying to help! 👍

This doesn't work, returns only two values and both has valid relations, maybe because id's are TEXT.

 

And I forgot to mention, this has to be dynamic by selected period of dates from appEvents TEST table.

 

Probably would solve the problem if I could select that option separatly for each field. Example:

option.PNG

 

If I remove Properties_System field everything works and if I add this to Matrix table with values from appEvents, also displays correctly, but cannot apply Status filter. 

 

Logic is to when Inactive is selected display all values from recources TEST wich don't have any relation from table appEvents TEST for the selected time period.

When Active is selected display all relations

When All onboarded display both

v-jianboli-msft
Community Support
Community Support

Hi @SoftDev ,

 

What is your filter and what the source data looks like?

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi!

 

Fields Table recources TEST(Business application) and table appEvents TEST(Properties_System) from both tables are in the same Business application data filter

relations.PNG

And using this table for filtering Business application data filter wich makes it dynamic filter

statustable.PNG

Measures are used in data filter for Business application filter like: 

Filter status TEST = if(selectedvalue('Status table'[Status]) = "Active", if([Current message count TEST] > 0, 1, 0), if(SELECTEDVALUE('Status table'[Status]) = "Inactive", if(or([Current message count TEST] = 0, isblank([Current message count TEST])),1, 0),if(SELECTEDVALUE('Status table'[Status]) = "All onboarded",1)))
 
Problem is, when "Inactive" or "All onboarded" is selected, Business applications without relation in appEvents TEST table is not displayed.
 
Filtering:
filtering.PNG
Hope this explains better 🙂

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.