Power bi slicer checkbox

In this Power bi tutorial, we will see the Power bi slicer checkbox. And also we will see the below points:

  • How to create power bi slicer checkbox
  • Power bi slicer checkbox color
  • Power bi slicer checkbox filter

Power bi slicer checkbox

Here we will see how to change the date slider slicer to a checkbox slicer in power bi desktop.

  • Open Power bi desktop.
  • Load the data using get data.
  • Select the slicer from the visualization.
  • In the field, drag and drop the order date column from the field pane.
How to create power bi slicer checkbox
How to create power bi slicer checkbox
  • Now click on the drop-down next to the order date field, select date hierarchy.
Power bi slicer checkbox
Power bi slicer checkbox
  • Now remove the month, qtr, and day from the date hierarchy by clicking on the Cross icon, except Year.
Power bi slicer checkbox
Power bi slicer checkbox

Now in the slicer visualization, select the dropdown arrow from the top right corner and select list.

Microsoft Power bi slicer checkbox
Microsoft Power bi slicer checkbox

In the below screenshot, you can see the power bi slicer checkbox.

How to create power bi slicer checkbox
How to create a power bi slicer checkbox

Read Power BI Slicer – How to use with examples

Power bi slicer checkbox color

Here we will see how to change the color of the selected item in the power bi slicer.

  • Currently, we cannot change the color of the selected items, in the power bi default slicer.
  • Instead of default slicer, you can use the custom visual i.e. Chicklet visual, which is versatile.
  • And also it allows lots of customization of the slicer buttons including setting images, changing selected item color etc.

Read Power BI Measure Date + Examples

Power bi slicer checkbox filter

Here we will see how to filter data by using the power bi slicer checkbox in the power bi desktop.

  • We have four columns Category 1, category 2, category 3, and Qty in the sample data.
  • Then we will create slicer table by using dax, which contain a column Called Status( yes or no).
  • Next we will create a measure that calculate number of events.
  • We will create slicer checkbox by adding status, when we check the box next to the yes, it will filter the data and show number of events.
  • Similarly when we check the box next to the no, it will filter the data and show number of events.
  • In the below screenshot you can see the sample table i have used.
Power bi slicer checkbox filter
Power bi slicer checkbox filter
  • Load the sample data in power bi desktop.
  • Then we will create a slicer table. To create slicer table, Click on the Modelling -> New table.
  • Then write the Dax formula is:
Table 2 = UNION(ROW("Status","Yes"),ROW("Status","No"))
Microsoft Power bi slicer checkbox filter
Microsoft Power bi slicer checkbox filter
  • Select the table(original table), click on the new measure from the ribbon.
  • The measure is:
No of Event = 
VAR _Checkbox =
    SELECTEDVALUE ( 'Table 2'[Status] )
VAR _YES =
    SUMX (
        FILTER (
            'Table',
            'Table'[Category1] = "A"
                && 'Table'[Category2] = "BB"
                && 'Table'[Category3] = "Event1"
        ),
        'Table'[QTY]
    )
VAR _NO =
    SUM ( 'Table'[QTY] )
RETURN
    IF (
        HASONEFILTER ( 'Table 2'[Status] ),
        IF ( _Checkbox = "Yes", _YES, _NO ),
        ""
    )
Microsoft Power bi slicer checkbox filter
Microsoft Power bi slicer checkbox filter
  • Select the slicer from the Power bi visualization.
  • In the field, drag and drop the status from the Table2 in the field pane.
Microsoft Power bi slicer checkbox filter
Microsoft Power bi slicer checkbox filter
  • Now build a card visual to show the measure result.
  • By default it will show blank in card visual, when we check the box next to No, it will show sum of QTY in the card visual.
  • When we check the box, next to Yes, it will show the filtered by Filter1(Category 1 = “A”), Filter2(Category2= “BB”) and filter3(Category3= “Event1”).
  • In the below screenshot, you can see when we select the check the box No in power bi slicer.
Microsoft Power bi slicer checkbox filter
Microsoft Power bi slicer checkbox filter
Microsoft Power bi slicer checkbox filter
Microsoft Power bi slicer checkbox filter

You may like the following Power Bi tutorials:

In this power bi tutorial, we learned the power bi slicer checkbox. And also we discussed the below points:

  • Power bi slicer checkbox
  • Power bi slicer checkbox color
  • Power bi slicer checkbox filter
>