Forum Discussion
filter based on another report
Hi, I have a table
Name Type
Messi Football
Messi Cricket
Ronaldo Football
Nemar Football
I want names who only plays Football not both. Messi should not come.
Expected output
Name Type
Ronaldo Football
Nemar Football
Thanks in advance.
Hi Anonymous ,
We can try to use the following measure in visual filter to meet your requirement:
Visual Control = IF ( CALCULATE ( DISTINCTCOUNT ( 'Table'[Type] ), ALL ( 'Table' ) ) <> CALCULATE ( DISTINCTCOUNT ( 'Table'[Type] ), ALLSELECTED ( 'Table' ) ), IF ( CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( CALCULATETABLE ( 'Table', ALL ( 'Table'[Type] ) ), 'Table'[Type] IN DISTINCT ( 'Table'[Type] ) ) ) = CALCULATE ( COUNTROWS ( 'Table' ), CALCULATETABLE ( 'Table', ALL ( 'Table'[Type] ) ) ), 1, -1 ), 1 )
Best regards,
4 Replies
- MFelixSuper User
Hi Anonymous ,
This is not a very explicit question but believe that what you need is to create a measure similar to this:
Filter = CALCULATE(DISTINCTCOUNT('Table'[Type]);ALLEXCEPT('Table';'Table'[Name]))Than place it on the filter visualization and select where value is equal to 1.
For the future please see this post regarding How to Get Your Question Answered Quickly (courtesy of @Greg_Deckler) and How to provide sample data in the Power BI Forum (courtesy of @ImkeF).
- v-lid-msftCommunity Support
Hi Anonymous ,
We can try to use the following measure in visual filter to meet your requirement:
Visual Control = IF ( CALCULATE ( DISTINCTCOUNT ( 'Table'[Type] ), ALL ( 'Table' ) ) <> CALCULATE ( DISTINCTCOUNT ( 'Table'[Type] ), ALLSELECTED ( 'Table' ) ), IF ( CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( CALCULATETABLE ( 'Table', ALL ( 'Table'[Type] ) ), 'Table'[Type] IN DISTINCT ( 'Table'[Type] ) ) ) = CALCULATE ( COUNTROWS ( 'Table' ), CALCULATETABLE ( 'Table', ALL ( 'Table'[Type] ) ) ), 1, -1 ), 1 )
Best regards, - Ashish_MathurSuper User
- v-lid-msftCommunity Support
Hi Anonymous ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,