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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Lily_DS
Frequent Visitor

column value based filter

hello 

 

I am building a dashboard contains a filter of companies name
i need please hide the other names depends on this filter
for example:

 

table look like:

nameamount
aramco200195$
sabic412000$
nobco211300$
tsnee350100$

 

if filter = "nobco"

table will be : ( hide any other companies name)

nameamount
-200195$
-412000$
nobco211300$
-350100$

 

i try to use ISFILTERD () functio but it ask for one value, I don't know if there is a way to use it with IF and conditions .

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Lily_DS 

 

You can try the following methods.
Measure:

Name measure = 
SWITCH(TRUE(),
    SELECTEDVALUE ( Slicer[name] ) = BLANK (),SELECTEDVALUE ( 'Table'[name] ),
    SELECTEDVALUE ( Slicer[name] ) = SELECTEDVALUE ( 'Table'[name] ),SELECTEDVALUE ( 'Table'[name] ),
    "-"
    )

vzhangti_0-1667202023800.pngvzhangti_1-1667202032488.png

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @Lily_DS 

 

You can try the following methods.
Measure:

Name measure = 
SWITCH(TRUE(),
    SELECTEDVALUE ( Slicer[name] ) = BLANK (),SELECTEDVALUE ( 'Table'[name] ),
    SELECTEDVALUE ( Slicer[name] ) = SELECTEDVALUE ( 'Table'[name] ),SELECTEDVALUE ( 'Table'[name] ),
    "-"
    )

vzhangti_0-1667202023800.pngvzhangti_1-1667202032488.png

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thank you so much ,,  I tryed your solution it's great.🙏

@v-zhangti ,
Hello,
I am not the author of this thread, however, I am interested in this topic, I checked your solution, and it's great.
You create a new table just for the slicer, I wonder if you can do it within the same table or have a relationship between those two tables.

 
mangaus1111
Solution Sage
Solution Sage

Hi @Lily_DS ,

see my pbi file

https://1drv.ms/u/s!Aj45jbu0mDVJizIXmIgvc_G-Fc_i?e=qrj22n

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.