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
7,471 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,520 points
Thanks a lot :)

Related Questions In Power BI

0 votes
0 answers
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
968 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,770 points
3,602 views
+1 vote
0 answers

Can Distinct Values be Counted in Power BI with a Filter?

Can Distinct Values be Counted in Power ...READ MORE

Oct 23 in Power BI by Evanjalin
• 6,710 points
86 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,474 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,350 points
1,169 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,956 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,350 points
37,665 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,520 points
14,023 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,520 points
1,143 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