Događaj
Power BI DataViz Svetsko prvenstvo
14. feb 16 - 31. mar 16
Sa 4 šanse za ulazak, možete osvojiti konferencijski paket i stići do LIVE Grand Finale u Las Vegasu
Saznajte višeOvaj pregledač više nije podržan.
Nadogradite na Microsoft Edge biste iskoristili najnovije funkcije, bezbednosne ispravke i tehničku podršku.
You can create variables for your reports, interact with the variable as a slicer, and visualize and quantify different key values in your reports.
Create a parameter on the Modeling tab in Power BI Desktop. When you select it, a dialog box appears where you can configure the parameter.
The following examples use Numeric range, similar procedures apply to using Fields. Name the example Discount Percentage and set its Data type to Decimal number. The Minimum value is zero. The Maximum is 0.50 (50 percent). Also set the Increment to 0.05, or five percent. The increment determines how much the parameter will adjust when interacted with in a report.
Napomena
For decimal numbers, make sure you precede the value with a zero, as in 0.50 versus just .50. Otherwise, the number won't validate and the OK button won't be selectable.
For your convenience, the Add slicer to this page checkbox automatically puts a slicer with your parameter onto the current report page.
In addition to creating the parameter, you also create a measure automatically in this process, which you can use to visualize the current value of the parameter.
It's important and useful to note that after you create a parameter, both the parameter and the measure become part of your model. So, they're available throughout the report and can be used on other report pages. And, since they're part of the model, you can delete the slicer from the report page. If you want it back, choose the parameter from the Fields list and drag it onto the canvas, then change the visual to a slicer.
This next example shows you how to use a parameter with data. You created the parameter in the previous section. Now you'll put it to use by creating a new measure whose value adjusts with the slider.
The new measure is going to be the total sales amount, with the discount rate applied. You can create complex and interesting measures that let the consumers of your reports visualize the variable of your parameter. For example, you could create a report that lets sales people see their compensation if they meet certain sales goals or percentages, or see the effect of increased sales to deeper discounts.
Enter the measure formula into the formula bar, and name the formula Sales after Discount.
Sales after Discount = SUM(Sales[SalesAmount]) - (SUM(Sales[SalesAmount]) * 'Discount percentage' [Discount percentage Value])
Then, create a column visual with OrderDate on the axis, and both SalesAmount and the just-created measure, Sales after Discount as the values.
Then, as you move the slider, you'll see that the Sales after Discount column reflects the discounted sales amount.
This process is how you create parameters for any data you might want to work with. You can use parameters in all sorts of situations. These parameters enable the consumers of reports to interact with different scenarios that you create in your reports.
There are a couple considerations and limitations for parameters to keep in mind:
Parameters can only have 1,000 unique values. For parameters with more than 1,000 unique values, the parameter values will be evenly sampled.
Parameters are designed for measures within visuals, and might not calculate properly when used in a dimension calculation.
You might also be interested in the following articles:
Događaj
Power BI DataViz Svetsko prvenstvo
14. feb 16 - 31. mar 16
Sa 4 šanse za ulazak, možete osvojiti konferencijski paket i stići do LIVE Grand Finale u Las Vegasu
Saznajte višeObuka
Modul
Create visual calculations in Power BI Desktop - Training
Calculations in Power BI are necessary to enrich data analysis. Visual calculations simplify complex formulas, enhance performance, and reduce maintenance.
Certifikacija
Microsoft Certified: Power BI Data Analyst Associate - Certifications
Demonstrate methods and best practices that align with business and technical requirements for modeling, visualizing, and analyzing data with Microsoft Power BI.