Creating User Input Variables in a Power BI Report

Posted on by By admin, in Power BI | 0

Requirements: In a report, a user should have the flexibility to enter the input number and that number should filter the data. In Power BI reports, we can create slicer with input number and we have options to choose either single-select or multi-select but we do not have the option to enter the number.

This blog will provide the steps to create a user input variable and how it can be used as a filter in the report.

Prerequisites: Power BI Desktop

Sample Employee Details file attached below

  1. Open Power BI desktop
  2. Click on Get Data, select Excel and Load the employee details file into power bi desktop
  3. Make data easy with Helical Insight.
    Helical Insight is world's best open source business intelligence tool.
    Click Here to Free Download

  4. Create a simple tabular report with all employee details
  5. Employee Details

  6. Using slicer visual, we can create either single select or multi select year filter. See the below image
  7. Year of Joining

  8. But the requirement is to create a single user input parameter which can be used to enter input value like below
  9. 2019 year

    To create like this follow below steps

  10. In top header ribbon, choose Modeling and click on “What If” parameter
  11. Modeling WhatIF

    Make data easy with Helical Insight.
    Helical Insight is world's best open source business intelligence tool.
    Grab The Free Trail

  12. New window will open, here we have enter few details like parameter name, data type, minimum and maximum number, increment value and default value. Select add slicer to the page and Click on OK
  13. WhatIf Parameter

  14. Above step will create new table in the report and will add slicer to the report page. Here we can enter the values with in that range and we can also use the slicer to change the value. We have the option to remove slicer also
  15. Year of Joining 2019

  16. Now we have the slicer and report but when the slicer value change report will not get affect as there is no relationship between these two
  17. Click on “Manage Relationships” in Home ribbon. Add the relationship between these two tables
  18. Edit Releationship

  19. Click on OK. Now report will show data for default value selected. Change the slider on filter or enter value to check the data for that year
  20. Make data easy with Helical Insight.
    Helical Insight is world's best open source business intelligence tool.
    Get your 30 Days Trail Version

    Filtered Data

    Filtered Data

    Filtered Data

  21. We can see in the above images that employee details were shown for the selected year and if there is no data for the selected year it will show blank.

Output

In case if you have any queries please get us at support@helicaltech.com

Thank You
Ramu Vudugula
BI Developer
Helical IT Solutions Pvt Ltd

logo

Best Open Source Business Intelligence Software Helical Insight Here

logo

A Business Intelligence Framework


logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

5 1 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments