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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
newbie9
Helper I
Helper I

selected value for multiple select

Hi All,

what I need is

if no region is selected in the region slicer then the measure need to show US region value for selected player

i.e for player A

if region is not selected then measure should show 100 (US region) if not then it should show max of selected regions

 

I can give if condition with selectedvalue() but it will not work when 2 items are selected 

how can I overcome this?

 

 

Measure = SWITCH(
    SELECTEDVALUE(Table1[player]),
    "a",CALCULATE(MAX(Table1[value]),Table1[player]="a"),
    "b",CALCULATE(MAX(Table1[value]),Table1[player]="b"),
    "c",CALCULATE(MAX(Table1[value]),Table1[player]="c")
)

 

playerregionvalue
aindia300
auk200
aus100
bindia400
buk190
bus150
cindia900
cuk170
cus250
1 ACCEPTED SOLUTION

@newbie9 , Use this measure that will give result on the basis of whether region is selected or not.

 

Measure 4 = IF(ISFILTERED(Table1[region]) , SWITCH(
    SELECTEDVALUE(Table1[player]),
    "a",CALCULATE(MAX(Table1[value]),Table1[player]="a"),
    "b",CALCULATE(MAX(Table1[value]),Table1[player]="b"),
    "c",CALCULATE(MAX(Table1[value]),Table1[player]="c"))
, CALCULATE(MAX(Table1[value]), Table1[region] = "us") )

View solution in original post

4 REPLIES 4
ChiragGarg2512
Solution Sage
Solution Sage

@newbie9 , Is this what the requirement is?

ChiragGarg2512_0-1695635627568.png

ChiragGarg2512_1-1695635672110.png

 

 

 

@ChiragGarg2512 

 

yes that's it 

when no region is selected for A then 100

if all regions are selected then 300

if us & uk is selected then 200

if uk & India is selected then 300

if uk alone then 200

if us alone then 100

 

no region is selected it should give show value of US region if not MAX of selected regions

@newbie9 , Use this measure that will give result on the basis of whether region is selected or not.

 

Measure 4 = IF(ISFILTERED(Table1[region]) , SWITCH(
    SELECTEDVALUE(Table1[player]),
    "a",CALCULATE(MAX(Table1[value]),Table1[player]="a"),
    "b",CALCULATE(MAX(Table1[value]),Table1[player]="b"),
    "c",CALCULATE(MAX(Table1[value]),Table1[player]="c"))
, CALCULATE(MAX(Table1[value]), Table1[region] = "us") )

thanks @ChiragGarg2512  

now it's working as expected

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.