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

View all the Fabric Data Days sessions on demand. View schedule

Reply
dw700d
Post Patron
Post Patron

Slicing Columna A based on Column B

I would like  to create a slicer Based on "yes" and "no". The logic would be as follows

if a [President] has a [Partner] then "Yes" if not then "NO".

So for example, if I selected yes in the slicer Dave and Carl would populate because they have a partner and if I select no in the slicer then Joe and Donald would populate because they do not.

PresidentVice PresidentPartner
DaveBillA
DaveKevinB
DaveJohnC
CarlAaronD
CarlGregE
CarlGaryF
DaveLamrnull
CarlPatricknull
JoeAnthonynull
DonaldIsabellanull

 

 

What is the most effective way to accomplish this ? I am open to creating a measure or making adjustments in the query editor?

2 REPLIES 2
amitchandak
Super User
Super User

@dw700d , Try a measure like

measure =

var _sel = selectedvalue(flag[flag])

return

if(_sel = "Yes", countrows(filter(Table, not(isblank(Table[Partner])) ) ),
countrows(except( Summarize(filter(Table, isblank(Table[Partner])), Table[President]),Summarize(filter(Table, not(isblank(Table[Partner]))), Table[President])))
)

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak thank you , can you add some contect? Am i Dropping this measure in  the slicer? or the table?

Should I be creating  a custom column  with yes if partner is not null to be me slicer?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors