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,200 points
3,582 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,040 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
• 32,460 points
84 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,010 points
257 views
+3 votes
1 answer

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
• 32,460 points
22,192 views
0 votes
1 answer

Calculated column with the sum of values from many columns in a row

Hi, You can create a new column by ...READ MORE

answered Mar 14, 2019 in Power BI by Cherukuri
• 32,460 points
150 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,200 points

edited Oct 11, 2018 by Kalgi 462 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
• 51,850 points
200 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 22, 2019 in Power BI by VNK
13,290 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
• 51,850 points
17,527 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,040 points
6,015 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,040 points
89 views