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.
- Now click on the drop-down next to the order date field, select date hierarchy.
- Now remove the month, qtr, and day from the date hierarchy by clicking on the Cross icon, except Year.
Now in the slicer visualization, select the dropdown arrow from the top right corner and select list.
In the below screenshot, you can see the 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.
- 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"))
- 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 ),
""
)
- Select the slicer from the Power bi visualization.
- In the field, drag and drop the status from the Table2 in the field pane.
- 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.
You may like the following Power Bi tutorials:
- Power bi slicer multiple columns with examples
- Microsoft Power BI Card
- Power bi slicer panel – How to use
- Power bi slicer filter another slicer – How to do
- Power bi treemap – How to use
- Power bi date filter
- How to create a table in Power bi dashboard
- Power bi measure switch statement
- Power Bi count function
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
Bhawana Rathore is a Microsoft MVP (3 times in Office Apps & Services) and a passionate SharePoint Consultant, having around 10 years of IT experience in the industry, as well as in .Net technologies. She likes to share her technical expertise in EnjoySharePoint.com and SPGuides.com