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,100 points
1,594 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
• 14,090 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 in Power BI by Cherukuri
• 19,510 points
22 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 in Power BI by Phalguni
• 1,010 points
56 views
0 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 in Power BI by Cherukuri
• 19,510 points
2,356 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 in Power BI by Cherukuri
• 19,510 points
27 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,100 points

edited Oct 11, 2018 by Kalgi 139 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
• 39,150 points
63 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 in Power BI by VNK
6,493 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
• 39,150 points
4,838 views
0 votes
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
• 14,090 points
1,941 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
• 14,090 points
32 views