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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Benc7777
Helper I
Helper I

View Data in table 2 only when something in table 1 is selected.

Afternoon / Morning all,

 

I hope somebody can help, so I have done my query in SQL, created table one, now I want to only see data in table 2 when something is select by clicking the line in table 1 ?

 

Is this even possible ? Ive been trying and searching but have not come up with a solution yet ?

 

I wondered if there was a kind person that was much brighter than me that could help ?

 

B

 

Benc7777_0-1730386363772.png

 

3 ACCEPTED SOLUTIONS
adudani
Super User
Super User

hi @Benc7777 ,

 

 if you want the product orders table to filter the order details:

 

select the product orders tables

1. click on "Format"

2. click on "Edit interactions"

3. click on "Filter"

 

this will enable the filtering.

 

let me know if this is resolved.

 

adudani_0-1730386959259.png

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

View solution in original post

My mistake, HASONEVALUE was never going to work.Try

Single Order Selected = IF( COUNTROWS( ALLSELECTED( 'Query1'[Order Number])), 1 )

View solution in original post

Anonymous
Not applicable

Hi @Benc7777 ,

 

I think johnt75's measure is correct in its thinking, but you need to add some comparisons for it to work.

Please try code as below.

 

Something is Selected =
VAR _TotalCount =
    COUNTROWS ( ALL ( 'Query1'[Order Number] ) )
VAR _SelectCount =
    COUNTROWS ( ALLSELECTED ( 'Query1'[Order Number] ) )
RETURN
    IF ( _SelectCount >= 1 && _SelectCount < _TotalCount, 1 )

 

Add this into visual level filter and set it to show items when value =1.

Result is as below.

vrzhoumsft_0-1730444477062.png
vrzhoumsft_1-1730444491546.png

vrzhoumsft_2-1730444499349.png

 

Best Regards,
Rico Zhou

 

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

 

View solution in original post

7 REPLIES 7
Benc7777
Helper I
Helper I

Hi @adudani,

 

Many thanks for taking the time, yes the part works, but I dont want the order details to show anything unless something is selected within the Future Orders table.

johnt75
Super User
Super User

You could create a measure like

Single Order Selected = IF( HASONEVALUE( 'Query1'[Order Number]), 1 )

Add that as a filter to the details table visual and set it only show when the value is 1.

I have tried that but i think ive done something wrong its not changed ?

 

Benc7777_0-1730388445524.png

 

Anonymous
Not applicable

Hi @Benc7777 ,

 

I think johnt75's measure is correct in its thinking, but you need to add some comparisons for it to work.

Please try code as below.

 

Something is Selected =
VAR _TotalCount =
    COUNTROWS ( ALL ( 'Query1'[Order Number] ) )
VAR _SelectCount =
    COUNTROWS ( ALLSELECTED ( 'Query1'[Order Number] ) )
RETURN
    IF ( _SelectCount >= 1 && _SelectCount < _TotalCount, 1 )

 

Add this into visual level filter and set it to show items when value =1.

Result is as below.

vrzhoumsft_0-1730444477062.png
vrzhoumsft_1-1730444491546.png

vrzhoumsft_2-1730444499349.png

 

Best Regards,
Rico Zhou

 

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

 

@AnonymousYou sir have won the internet today, this worked perfectly. I really appriciate your help.

 

I also appriciate @johnt75 and @adudani for their inputs too.

 

Really helped me guys, thanks.

 

I will no doubt be back to ask more questions of the godly like skills of this helpful forum very soon.

 

Have a great weekend

B

My mistake, HASONEVALUE was never going to work.Try

Single Order Selected = IF( COUNTROWS( ALLSELECTED( 'Query1'[Order Number])), 1 )
adudani
Super User
Super User

hi @Benc7777 ,

 

 if you want the product orders table to filter the order details:

 

select the product orders tables

1. click on "Format"

2. click on "Edit interactions"

3. click on "Filter"

 

this will enable the filtering.

 

let me know if this is resolved.

 

adudani_0-1730386959259.png

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.