Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Power excel 2016 with mrexcel Master Pivot Tables, Subtotals, Charts, VLOOKUP, IF, Data Analysis in Excel 2010–2013 (Bill Jelen) (z-lib.org).pdf
Скачиваний:
4
Добавлен:
14.08.2022
Размер:
49.75 Mб
Скачать

384

POWER EXCEL WITH MR EXCEL

 

 

 

UNFILTER USING TIME INTELLIGENCE

The previous topic showed how you could unapply the Sector filter to get all sales for another sector. What if you need to compare sales for this date to all dates in the month? Or a running MTD number? Or sales from a prior year? DAX introduces many new time intelligence functions that can be used to unapply a filter.

If you wanted to compare calculate Month to Date sales, you should be able to refilter the date using calculate: =CALCULATE(Sum(Sales[Revenue]),DATESMTD(Sales[Date])). The DATESMTD() function returns a list of dates to consider.

CONVERT POWER PIVOT TO FORMULAS

A few pages ago, I talked about all the bad side-effects of having Power Pivot use OLAP pivot tables. Here is one advantage that you can take advantage of because it is an OLAP table. In this case, I might take a regular flat Excel data set through Power Pivot to take advantage of the cube formulas.

Say that you build a pivot table in Power Pivot. You can go the PivotTable Tools Option ribbon tab, choose

OLAP Tools and Convert to Formulas.

Figure 979 Change the pivot table to formulas.

After invoking this command, the pivot table changes to formulas using the cube functions. Even though the pivot table no longer exists, the formulas continue to respond to the slicers!

Figure 980 You can move these cells around, insert blank rows, and so on.

JANUARY ACTUALS AND FEBRUARY PLAN

The example in "Can I Save Formatting in a Template?" on page 317 used GetPivotData to show Actual for some months and Plan for other months.

Good news: Excel 2010 offers a new feature called named sets that finally allows you to create asymmetric reports.

PART 3: WRANGLING DATA

385

 

 

Bad news: Named sets work only with OLAP pivot tables for this release, so you cannot use them with regular pivot tables.

Good news: If you take your regular Excel data through Power Pivot, the data becomes an OLAP pivot table, and therefore you can use named sets.

To recap the problem, you want to show Actuals for January through April and Plan for the remaining months:

Figure 981 Show Actuals for some months and Plan for other months.

In the PivotTable Tools Option tab, choose Fields, Items, Sets and choose Create Set Based on Column

Items.

3

Figure 982 Create a named set.

Excel shows you a dialog with a new row for every column in your pivot table. Highlight a column and click

Delete Row to remove it from the pivot table.

Figure 983 You can delete specific columns from the set.

386

POWER EXCEL WITH MR EXCEL

 

 

You eventually end up with a list of only the desired columns.

Figure 984 Keep deleting columns until only the desired items are left.

The resulting pivot table is shown below. It is amazing how hard this is in regular pivot tables, but certainly possible with Power Pivot datasets.

Figure 985 The named set leaves an asymmetric pivot table.

POWER VIEW IS REPLACED WITH POWER BI

Problem: Where is Power View? I had Power View in Excel 2013 and it is missing from Excel 2016.

Strategy: Microsoft has hidden Power View in Excel 2013 and removed it from Excel 2016. They feel that

Power BI is superior.

POWER BI TRANSFORMS EXCEL DATA INTO INTERACTIVE DASHBOARDS

Problem: What is Power BI?

Strategy: Since Office 2010, Microsoft has been bolting various tools on to Excel. The Power Pivot data model lets you create relationships between tables and do new calculations. The Power Query tools let you clean the data. Power View offered interactive dashboards. But Power View was never really a part of Excel. It always felt like a foreign body invading Excel. Power BI is a “do-over”. They’ve built all of the goodness of Power Pivot and Power Query into a new product with better visualizations than Power View.

Power BI is free. You can import data from Excel, Access, Oracle, or dozens of other services. Provided you can find a key field connection between the data, you can mash up data from these different sources. You can add new calculations using the same DAX formula language introduced in Power Pivot. You can cre- ate better charts than those available in Excel. Finally, you can share the dashboard with your manager’s manager and that person can consume the data on an iPad, mobile phone or tablet.

FIRST POWER BI STEP: GET A FREE ACCOUNT FOR POWER BI

Problem: How do I get started with Power BI?

PART 3: WRANGLING DATA

387

 

 

Strategy: The first step is to get a free account for Power BI. Go to PowerBI.Microsoft.Com. You will need a work address. What is the definition of a work address? It is something that is not a free e-mail account from Gmail, Yahoo, AOL, or others.

OPTIONAL STEP 1: TAKE THE SAMPLE DASHBOARDS FOR A SPIN

Problem: How do I get my feet wet?

Strategy: Explore the sample dashboards available at PowerBI.Microsoft.com.

While you are signed on to PowerBI, click the Get Data icon in the lower left corner of the screen.

Figure 986 Click Get Data to find the sample dashboards.

On the next screen, use the Samples link in the lower left corner.

3

Figure 987 Several pre-built dashboards will show you what is possible.

From the next screen, choose any of the sample dashboards and choose Connect. It will take a moment for the data to load, and then your sample dashboard will appear in the Dashboards panel on the left side of the screen. Click the dashboard name to load it in the browser.