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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Shavo26
Frequent Visitor

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 3

Thanks for your solution.
I already tried a lot for the exclusion slicer. The issue thats stay is that the measure is not "linked" to the data and cannot be used in other visuals with the same result, hasException is calculated again depending on the way the data is aggregated.

I think my issue can be formulated as so : how can I link the result of a measure in a visual (itself depending on the slicer result - this part is ok I think) to the data so it stays as an information?
How can hasException be calculated at some point and be linked to the ID for all the visual, so I can filter on it the same way on all the visuals of the report?

Thanks a lot

That is indeed a more difficult question than doing it for a particular measure.

 

I've not tried this, but maybe you could do it by using a calculation group page filter with a calculation item like:

CALCULATE (
    SELECTEDMEASURE (),
    EXCEPT ( VALUES ( Fact[ID] ), VALUES ( Exclude[ID] ) )
)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.