Power BI what if Parameter Percentage

In this Power BI article, how to add the What if Parameter Percentage to a Power BI report.

What if Parameter Percentage in Power BI

Let us see how to add the what-if parameter percentage in the power bi report.

Here in this article, we use sales table data and calculate the percentage of the discount value based on the product column.

  • Loadtable data into Power BI desktop -> select a get data option -> and choose the clustered column and drag and drop the Product Name and Discount field values in it as below:
What if Parameter Percentage in Power BI example
What if the Parameter Percentage in the Power BI example
  • Now select a Modeling tab in the top ribbon and select the What IF parameter as highlighted below:
Add What if Parameter in the Power BI
Add What if Parameter in the Power BI
  • A What if parameter pop window appears, Enter the parameter name in the name section.
  • In the Data type section, select the data type as a whole number, decimal number, and fixed decimal number.
  • We can also set Minimum value, Maximum value, Increment, and Default value, and to save the What-if parameter clicks on the ok button below:
Example of What if Parameter Percentage in Power BI
Example of What if Parameter Percentage in Power BI
  • Under the Fields pane, we can see that the Parameter has been created as a New Table.
  • Once the parameter has been created. It automatically creates two measure values for the generated series and for the selected value.
Example of What if Parameter Percentage in a Power BI
Example of What if Parameter Percentage in a Power BI

For generated series:

DiscountValue = GENERATESERIES(1, 2, 0.01)

For Selected Value:

DiscountValue Value = SELECTEDVALUE('DiscountValue'[DiscountValue])
  • Now we can apply the parameter to calculate the percentage of the discount column based on the product value, create a new measure and apply the below-mentioned formula:
Discount % = Sales_Table[discount value] * DiscountValue[DiscountValue Value]

Where,

  1. Discount % = New measure name
  2. Sales_Table = Table Name
  3. DiscountValue[DiscountValue Value] = Parameter Value
  • Now simply drag and drop the created measure value in the clustered column chart. The screenshot below displays the discount and discount percent value based on the product as the same.
What if Parameter Percentage in a Power BI
What if Parameter Percentage in a Power BI
  • When we change or slide the Parameter slicer value, the clustered column chart displays the discount percentage value according to the selection.
What if Parameter Percentage in a Power BI example
What if the Parameter Percentage in a Power BI example

This is how to display the What-if parameter percentage value in the Power Bi report.

This Power BI article demonstrated how to display the What-if parameter percentage value in the Power Bi report.

You may also like the following power bi tutorials:

>