Forum Discussion
Regarding Power Bi filtering Issue
- 1 year ago
Hi PrathamS ,
You can solve this issue in Power BI by using a disconnected slicer and a DAX measure to filter out the selected researcher. First, create a new table that contains a distinct list of researchers from your main table. This table should not have any relationship with your main data table. You can do this by writing the following DAX code:
ResearcherList = DISTINCT(SELECTCOLUMNS('YourTable', "Researcher", 'YourTable'[Researcher]))Use this new ResearcherList table as the source for your slicer. Because it's disconnected, selecting a value in the slicer won't automatically filter your main table.
Next, create a DAX measure that checks whether the researcher in each row is different from the one selected in the slicer. If it is different or if nothing is selected, the measure will return 1. Otherwise, it will return 0. Here's the DAX measure:
ShowRow = VAR SelectedResearcher = SELECTEDVALUE(ResearcherList[Researcher]) RETURN IF( 'YourTable'[Researcher] <> SelectedResearcher || ISBLANK(SelectedResearcher), 1, 0 )Finally, add this ShowRow measure as a visual-level filter to your table visual, and set the filter condition to show only rows where ShowRow equals 1. This approach will allow the user to select a researcher using the slicer, and the table visual will display all rows where the researcher is not the one selected.
Best regards,
Hi PrathamS ,
You can solve this issue in Power BI by using a disconnected slicer and a DAX measure to filter out the selected researcher. First, create a new table that contains a distinct list of researchers from your main table. This table should not have any relationship with your main data table. You can do this by writing the following DAX code:
ResearcherList = DISTINCT(SELECTCOLUMNS('YourTable', "Researcher", 'YourTable'[Researcher]))
Use this new ResearcherList table as the source for your slicer. Because it's disconnected, selecting a value in the slicer won't automatically filter your main table.
Next, create a DAX measure that checks whether the researcher in each row is different from the one selected in the slicer. If it is different or if nothing is selected, the measure will return 1. Otherwise, it will return 0. Here's the DAX measure:
ShowRow =
VAR SelectedResearcher = SELECTEDVALUE(ResearcherList[Researcher])
RETURN
IF(
'YourTable'[Researcher] <> SelectedResearcher || ISBLANK(SelectedResearcher),
1,
0
)
Finally, add this ShowRow measure as a visual-level filter to your table visual, and set the filter condition to show only rows where ShowRow equals 1. This approach will allow the user to select a researcher using the slicer, and the table visual will display all rows where the researcher is not the one selected.
Best regards,