cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shreeram04
Frequent Visitor

Slicer

Hi All,

 

I have a slicer that contains three products apple,redmi, and one plus when I click apple it filters all apple values from a table, how can I achieve this one. Please help me. Thanks in advance.

 

Following table

 

Shreeram04_0-1652675951172.png

For example, when I click apple means the total sale value shown is 1500 and redmi means the total value shown is 1200. Please help me. Thanks in advance.

1 ACCEPTED SOLUTION
isabella
Microsoft
Microsoft

Hi @Shreeram04 

I did a local test,below are test screenshot select Redmi

isabella_0-1652939149520.png

 

select Apple :

 

isabella_1-1652939149521.png

 

 

Here are my steps:

At first I created 3 measures to sum the 【product has the specific string apple oneplus or redmi

hasapple = SUMX(Table4, IF(CONTAINSSTRING(MAX([product]),"apple"),1,0))

hasoneplus = SUMX(Table4,IF(CONTAINSSTRING(MAX([product]),"oneplus"),1,0))

hasredmi = SUMX(Table4,IF(CONTAINSSTRING(MAX([product]),"redmi"),1,0))

 

then I create a measure to connect these measure and slicer ,Table5 is the slicer table

filtermeasure = SWITCH( TRUE(),

SELECTEDVALUE('Table5'[product])="Apple" ,[hasapple],

SELECTEDVALUE('Table5'[product])="Redmi" ,[hasredmi],

SELECTEDVALUE('Table5'[product])="Oneplus" ,[hasoneplus],

1)

Then in visualization  I can use this measure to filter the table :

Select the table, add the measure as filter,then select is 1 ,then press the apply filter button

isabella_2-1652939149522.png

 

 

 

Best Regards,

Community Support Team _Isabella

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

3 REPLIES 3
isabella
Microsoft
Microsoft

Hi @Shreeram04 

I did a local test,below are test screenshot select Redmi

isabella_0-1652939149520.png

 

select Apple :

 

isabella_1-1652939149521.png

 

 

Here are my steps:

At first I created 3 measures to sum the 【product has the specific string apple oneplus or redmi

hasapple = SUMX(Table4, IF(CONTAINSSTRING(MAX([product]),"apple"),1,0))

hasoneplus = SUMX(Table4,IF(CONTAINSSTRING(MAX([product]),"oneplus"),1,0))

hasredmi = SUMX(Table4,IF(CONTAINSSTRING(MAX([product]),"redmi"),1,0))

 

then I create a measure to connect these measure and slicer ,Table5 is the slicer table

filtermeasure = SWITCH( TRUE(),

SELECTEDVALUE('Table5'[product])="Apple" ,[hasapple],

SELECTEDVALUE('Table5'[product])="Redmi" ,[hasredmi],

SELECTEDVALUE('Table5'[product])="Oneplus" ,[hasoneplus],

1)

Then in visualization  I can use this measure to filter the table :

Select the table, add the measure as filter,then select is 1 ,then press the apply filter button

isabella_2-1652939149522.png

 

 

 

Best Regards,

Community Support Team _Isabella

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

Shreeram04
Frequent Visitor

@amitchandak thanks for your reply, but my requirement is when I select apple in a slicer all cells that contain apple should be filtered.

amitchandak
Super User
Super User

@Shreeram04 , Please split the product column of table 2, using split by delimiter in power query

 

Split Column Power Query: https://youtu.be/FyO9Vmhcfag

 

 



New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors