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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
srlabhe
Super User
Super User

Selecting Multiple values in Measure Filter

Hi PBI Gurus

I have below measure created which has o/p as text values

 

varMeasRMAssignDiff =
VAR _StartExists = [varExistsatStart] > 0
VAR _EndExists = [varExistsatEnd] > 0
VAR _StartKey = [varKeyAtStart]
VAR _EndKey = [varKeyAtEnd]
VAR _RMlogin=SELECTEDVALUE(LOGIN_ID)
RETURN

SWITCH (
TRUE(),
--- if RM Login is Empty
ISBLANK(_RMlogin)=TRUE() ,
 "Not Found",

-- Present in both and unchanged
_StartExists && _EndExists && (ISBLANK(_StartExists)=FALSE() && ISBLANK(_EndExists)=FALSE()),
"No changes",

NOT _StartExists && NOT _EndExists,
"No changes",

-- Record added in End Snapshot
NOT _StartExists && _EndExists,
"newly assigned",

-- Record removed from End Snapshot
_StartExists && NOT _EndExists,
"unassigned",

-- Present in both but data changed
_StartExists && _EndExists && _StartKey <> _EndKey,
"Modify",
BLANK()
)
 
Then I have a disconnected table 
ChangeType = DATATABLE("Change", STRING, { {"No risk managers found for the selected desk and legal entity"}, {"No changes"}, {"RM newly assigned"}, {"Modify"},{"RM unassigned"},{"RM could be assigned but is not"} })
 
I have another measure to apply on the table visual
varIsInSelectedChange =
VAR selChange = SELECTEDVALUE( ChangeType[Change] ) // value selected in ChangeType slicer
VAR rowChange = [varMeasRMAssignDiff] // the computed change label for the row
RETURN
IF(
ISBLANK(selChange) || ISBLANK(rowChange),
1, // if no change selected or row has no label, keep it visible
IF(rowChange = selChange, 1, 0)
)
Now when I add varMeasRMAssignDiff as filter in table visual and varIsInSelectedChange =1 ,it allow me to select single value well but when I try to select mutiple values its doesnt work the way it should.
As it keep showing data for other values too.
How to make the meausre as filter to work even for multiple values selections?
 
1 ACCEPTED SOLUTION
srlabhe
Super User
Super User

I could achieve this by changing varIsInSelectedChange to below 

varIsInSelectedChange =
VAR selectedChanges = VALUES( ChangeType[Change] ) // Get all selected values as a table
VAR rowChange = [varMeasRMAssignDiff] // the computed change label for the row
RETURN
IF(
    ISBLANK( rowChange ),
    1, // if row has no label, keep it visible
    IF(
        ISEMPTY( selectedChanges ),
        1, // if no selection in slicer (slicer is empty), all rows are visible
        IF(
            rowChange IN selectedChanges, // Check if the row's change label is within the selected list
            1,
            0
        )
    )
)

View solution in original post

1 REPLY 1
srlabhe
Super User
Super User

I could achieve this by changing varIsInSelectedChange to below 

varIsInSelectedChange =
VAR selectedChanges = VALUES( ChangeType[Change] ) // Get all selected values as a table
VAR rowChange = [varMeasRMAssignDiff] // the computed change label for the row
RETURN
IF(
    ISBLANK( rowChange ),
    1, // if row has no label, keep it visible
    IF(
        ISEMPTY( selectedChanges ),
        1, // if no selection in slicer (slicer is empty), all rows are visible
        IF(
            rowChange IN selectedChanges, // Check if the row's change label is within the selected list
            1,
            0
        )
    )
)

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.