Quick Measures

Continuing with the example scenario we introduced in Chapter 3, Connecting and Shaping Data, Pam is feeling pretty good about her new advanced visualizations, but she suspects that the managers might want to see a running total of all hours accumulated during the year. However, Pam is uncertain about how to create a running total using DAX. Luckily, Power BI provides a feature called Quick Measures that can help with much of the DAX heavy lifting. To see how Quick Measures can be used to create DAX formulas, do the following:

  1. Expand the Hours table, right-click the Hours column, and choose New quick measure. The Quick measures dialog will be displayed.
  2. Under Calculation, use the drop-down menu and note the various types of quick measures that can be created.
  3. Under the Totals heading, find and select Running total.
  4. Drag and drop the Month column from the Calendar table into the Field area.
  5. Leave the Base value as Sum of Hours and the Direction as Ascending and then click the OK button.
  6. A new measure will be created in the Hours table called Hours running total in Month.
  7. Since Pam wishes to keep all of her measures together in her #Measures table, she selects the Modeling tab of the ribbon. Then, in the Properties section, she changes the Home table from Hours to #Measures. The new measure now appears under the #Measures table.
  8. Create a new visualization by clicking on a blank area of the canvas and then selecting Hours running total by Month in the #Measures table and the Month column from the Calendar table.
  9. Switch this visualization from a Clustered column chart to a Line chart. Note that, for months after March, the line remains horizontal since we do not have reported hours for months after March.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.103.183