Have column with multiple values in powerBI for use with a slicer in power bi

+1 vote

I have a column with the following data

basketball
football
basketball and football

I would like to add a slicer to this which has two options - basketball, football. If i ask for basketball, I should be getting all basketball entries from all three columns. Is this possible?

Oct 22, 2018 in Power BI by lina
• 8,220 points
6,932 views

1 answer to this question.

+1 vote

It can be achieved depending on the result you want to show for the filtered rows, e.g, a sum, average, count, etc.

I will show you a very simple example of a sum for the filtered rows by using the SUMX function available in DAX expressions.

Sport Value
Basketball 4
Football 11
Basketball & Football 9


Sliver column:

Basketball
Football

Add this code:
Result =
SUMX (
    FILTER (
        MyTable,
        [Sport] = FIRSTNONBLANK ( SlicerTable[SlicerColumn], 0 )
            || FIND ( FIRSTNONBLANK ( SlicerTable[SlicerColumn], 0 ), [Sport], 1, -1 ) > -1
            || NOT ISFILTERED ( SlicerTable[SlicerColumn] )
    ),
    [Value]
)
answered Oct 22, 2018 by Hannah
• 18,570 points
Thanks a lot :)

Related Questions In Power BI

0 votes
1 answer

Chart with only some values in field in a graph in power BI?

Hi Banu, While creating a chart, put the ...READ MORE

answered Apr 10, 2019 in Power BI by Cherukuri
• 33,030 points
686 views
0 votes
1 answer

I have a web API with basic authorisation and username and password. How do i connect to it in Power BI?

Hey, @There, I found your query is quite ...READ MORE

answered Oct 29, 2020 in Power BI by Gitika
• 65,910 points
3,021 views
0 votes
1 answer

How do you add a slicer from different table in Power BI?

In order to add a slicer from ...READ MORE

answered Mar 5, 2019 in Power BI by Phalguni
• 1,020 points
1,253 views
+2 votes
3 answers

How to replace null values with custom values in Power BI(power query editor)?

Hi Nithin, To fill or replace the null or ...READ MORE

answered Mar 8, 2019 in Power BI by Cherukuri
• 33,030 points
151,970 views
+3 votes
2 answers

Combine tables in Power BI

You can also achieve this using a ...READ MORE

answered Oct 5, 2018 in Power BI by lina
• 8,220 points

edited Oct 11, 2018 by Kalgi 2,080 views
0 votes
1 answer

Power Bi Dax Table

You need to wrap the numbers in ...READ MORE

answered Oct 5, 2018 in Power BI by Kalgi
• 52,360 points
921 views
0 votes
2 answers

Power BI Dax Multiple IF AND Statements

HI I have Column Patient 12 13 14 15 18 IN Patient=12, 13 Out ...READ MORE

answered May 23, 2019 in Power BI by VNK
18,405 views
0 votes
1 answer

Distinct count filtered by condition using Power BI Dax

Try this, it should work: DistinctCountActiveMonths = CALCULATE( ...READ MORE

answered Oct 5, 2018 in Power BI by Kalgi
• 52,360 points
36,920 views
+1 vote
1 answer

Is there a way to convert JSON data to readable table in power bi

Follow these steps step 1 - Click on ...READ MORE

answered Sep 24, 2018 in Power BI by Hannah
• 18,570 points
13,373 views
0 votes
1 answer

How do I know who in my organization has a Power BI account?

You can view the Azure Active Directory ...READ MORE

answered Oct 15, 2018 in Power BI by Hannah
• 18,570 points
868 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP