One of our clients decided to change their reporting platform to Power BI and started rebuilding their reports. However, they had a large number of reports. The implementation process began with the planning of the development phase. They embarked on the journey by creating eight sets of reports using multiple PBIX files.
One of the eight reports had 60 pages with 4 to 10 slicers on each page and navigation between the pages. A closer look at the plan reveals that the number of days or hours spent on development is only one portion of the project. A small amount of time in the plan was allocated towards testing and fixing the issues. However, in reality, testing is more painful than development and the fixing of issues took longer than originally planned. Every round of testing may result in changes to the functionality of the report.
Why is testing a report more painful than Development?
Development is a wheeled voyage, but testing and verifying each aspect requires walking back and covering the entire journey. There are numerous parts to test, including functionality, regression, user interface, upgrading, migration, and so on. Why do we need to have a proper plan for testing the reports when the report developer has completed the development as per the requirement?
Power BI reports, like any other software development project, necessitate careful planning and testing. Data issues in reports can lead to a loss of trust in the data displayed in the report if they are not tested. Let’s only discuss the testing of Slicers in this post because it may appear that testing of slicers is simple and won’t take up much time.
How to use Slicers in a Power BI report?
Case 1: Slicers used as a list with selection boxes or horizontal tabs. We may slice this data or report by Organization Name, and the elements in the list are easy to see.
- The user can inspect all of the Slicer’s elements.
- Any element can be readily selected by the user.
- Simple to put to the test
- This Slicer takes up a lot of room in the report.
- When we only have a minimal number of items on the list, it will be user-friendly.
Case 2: Slicers used as the dropdown in Power BI
We can add additional numbers in a limited place using the Slicers’ dropdown kind.
- The dropdown menu allows the user to simply navigate the list.
- It takes up very little space.
- It’s difficult to tell whether it’s single or multiple selections.
- It’s difficult to see if the search option for multiple selections is activated.
- It’s difficult to tell if the list is in the correct sequence.
- It’s difficult to see if the Slicer has been assigned the correct field.
We must look at the header when creating dropdown slicers or any other Slicer because the header provided in the Slicer header option is only by default left-aligned, which appears unusual, or even if we apply the name to the Slicer header, it can only be confirmed with the field at by clicking on it.
We must check the dropdown to see if all of the fields in the slicer are available and not filtered at the visual, page, or report level.
Case 3: Slicer used for Navigation function:
Slicers are typically used for bookmarks that have been selected or for a navigation list that has been prepared. This Navigation list is used to apply Navigation from a button or image/icon that has action.
The initial list of needed fields or values in the column, as well as the action applied to it, should be used to test the Slicer navigation.
Case 4: Date Slicers for the data in a date range
Date Slicer is to define a range of date fields in a dataset.
There are two ways to use a date slicer:
1. A date field assigned to a slicer will display the Slicer’s calendar selection option. In this case, we can assign a single column and define the range using the between option in the Slicer’s header.
2. We should use two slicers to describe the data if we have two date columns, one that displays the “from date” and the other that displays the “to date.” The range will be defined by selecting the From date Slicer with the option of ‘After’ and the To date Slicer with the option of ‘Before.’ d to specify the date range.
Adjust the slider to define the range.
Case 5: Slicer with a DAX Query
Slicer with a DAX Query, such as producing a list of items in the slicer using the SWITCH function
Testing of the Slicers
Slicer data validation
Slicer data should be validated individually to confirm that the list of items in the field is visible and matches the data source and that the data is not affected by any filter applied in the report.
Slicer format validation
Slicer layout and format should conform to the report requirements and report development standards of the organization. For example, the color, font, x, and y positions should be validated.
RLS based Slicer validation
The values displayed in a slicer may change based on the role of the user viewing the report. If there is a requirement to show limited values in the slicer based on the RLS security, the data in the slicer should be validated for different roles.
Slicer data sorting validation
Sorting applied to the slicer data is important for the end-user to be able to easily use the slicer. The sorting should conform to the requirements.
Validating data in other visuals based on the Slicer selection
Based on the slicer selections, filters should be applied to the visuals on the page automatically. In the case of Sync Slicers, filters should be applied to the visuals in all selected pages.
Slicer performance validation
Slicer rendering should be within the expected SLA for the report performance. As the slicer selections are changed, the report should be refreshed within the expected SLA.
Regression testing of Slicers
Any change in the data model or report can result in a regression issue for the slicer over a period of time. Regression testing of the slicers should be performed to ensure that the slicers are working as expected.
Interested in learning how to automate the slicer testing using BI Validator? Reach out to the datagaps team.