Forum Discussion
View Data in table 2 only when something in table 1 is selected.
- 1 year ago
My mistake, HASONEVALUE was never going to work.Try
Single Order Selected = IF( COUNTROWS( ALLSELECTED( 'Query1'[Order Number])), 1 ) - Anonymous1 year ago
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.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.
- Benc77771 year agoHelper I
I have tried that but i think ive done something wrong its not changed ?
- johnt751 year agoSuper User
My mistake, HASONEVALUE was never going to work.Try
Single Order Selected = IF( COUNTROWS( ALLSELECTED( 'Query1'[Order Number])), 1 ) - Anonymous1 year agoNot 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.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Benc77771 year agoHelper I
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