Forum Discussion

Shavo26's avatar
Shavo26
Frequent Visitor
4 years ago

Unselect multiple raws when only 1 in checked

Hi,
I have a problem that I need help figuring out the solution.
I have a lot of different visuals based on a table, containing an unique ID for each row.
Today, I  have a new table, which contain exception reasons that can apply to some ID. Several reasons can happen on one ID.
I want be able to check/uncheck one or several reasons in a slicer, so that the concerned visuals doesn't display any more information about theses IDs.
It seems simple with a simple link on the IDs between the two tables.

BUT.... I need that when one exception is checked/unchecked, the concerned ID disapear from the visuals even if some other reason still apply to it!
Basically, if reason 1, 2 and 6 apply to ID 123, ID 123 must disappear of the visuals if any of the reason 1, 2 or 6 are selected.
1, 2 and 6 are not linked.

I tried a lot of things :
- doing it on the db side, but I need the choice to check/uncheck reasons dynamically.

- aggregating the reasons on each ID line on the db side, but I can't figure out how to "disaggreagate" it when choosing with the slicer.
- building a reverse slicer that flag the IDs, using a measure to test if the reason is selected AND if the ID is in the list of exceptions, and filtering it on each visual. But the thing is that with the mesure, as soon as the data aggregate differently in the visual, the MAX() results differently.

I need some fresh ideas how to it! If you have some, I'll take any 🙂

Thanks a lot

 

hasException =
IF (CALCULATE ( IF ( ISFILTERED ( ExceptionTable[Reason]), 1, 0 ), ALLSELECTED ( ExceptionTable ) ) = 0,0,
    IF (MAX(IDList[ID]) IN ALLSELECTED(ExceptionTable[ID]),1,0)
)


3 Replies