Tải bản đầy đủ (.docx) (88 trang)

Thiết kế dashboard trong Excel

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (6.32 MB, 88 trang )

<span class="text_page_counter">Trang 1</span><div class="page_container" data-page="1">

 <b>#,##0_);(#,##0): Trong định dạng này, phần bên trái dấu chấm phẩy chính là</b>

định dạng dành cho số dương. Cịn bên trái dấu phẩy chính là định dạng dành cho số âm. Số âm sẽ được đặt trong dấu ngoặc. Cịn phần cuối số dương có dấu space và ngoặc đơn nghĩa là chừa một khoảng trống ở cuối số dương để khi hiển thị thì sẽ có khoảng trống bằng với dấu ngoặc đơn của số âm.

 <b>+#,##0;-#,##0: chúng ta có thể tự thêm vào dấu + và – trước chữ số dương</b>

và âm để hiển thị là số dương và số âm.

 <b>+0%;-0%: chúng ta có thể tự thêm vào dấu + và – trước tỷ lệ phần trăm</b>

dương và tỷ lệ phần trăm âm

</div><span class="text_page_counter">Trang 2</span><div class="page_container" data-page="2">

 <b>#,##0,"k": định dạng các số phần ngàn thành rút gọn phần ngàn với chữ k ở</b>

cuối. Ví dụ ta có 12000 thì khi định dạng như vậy sẽ trở thành 12k

 <b>#,##0.00,, "m": định dạng các số phần triệu thành rút gọn phần triệu với</b>

chữ m ở cuối. Lưu ý chúng ta dùng .00 ở cuối con số vì khi viết rút gọn số phần triệu thì phải thể hiện thêm hai số lẻ cuối. Ví dụ ta có 24650000 khi định dạng như vậy thành 24.65 m

 <b>#,##0_);(#,##0);"n/a": khi thêm dấu chấm phẩy thứ 2 vào định dạng số thì</b>

các ơ nào có giá trị bằng 0 sẽ được định dạng là n/a

 <b>#,##0_);(#,##0); : nếu sau dấu chấm phẩy thứ 2 chúng ta để trống thì các ơ</b>

có giá trị bằng 0 sẽ để trống.

 <b>[Blue]+0%;[Red]-0%: chúng ta cũng có thể định dạng màu hiển thị của</b>

chữ số. Ở định dạng này chúng ta định dạng phần trăm dương là màu xanh và phần trăm âm là màu đỏ. Có 8 màu tất cả là Black, Blue, Cyan, Green, Magenta,Red, White, Yellow

Tùy chỉnh định dạng ngày và giờ

Việc định dạng ngày và giờ khá đơn giản chỉ cần vào Format Cells và chọn Custom như định dạng cho số. Các định dạng phổ biến có thể tạo ra được liệt kê trong bảng dưới đây:

</div><span class="text_page_counter">Trang 3</span><div class="page_container" data-page="3">

Tạo buttons với macro trong Excel

Take a moment to create buttons for the two macros (AddDataBars and Remove-DataBars) that you create earlier in this chapter. Here’s how:

<b>1. Click the Insert drop-down list on the Developer tab. 2. Select the ButtonForm control, as shown in Figure 11-8.</b>

</div><span class="text_page_counter">Trang 4</span><div class="page_container" data-page="4">

<b>3. Click the location where you want to place your button.</b>

When you drop the Button control into the worksheet, the Assign Macro dialog box, shown in Figure 11-9, opens and asks you to assign a macro to this button.

<b>4. Select the macro that you want to assign.</b>

In this case, select the AddDataBars macro and click OK. 5. <b>Repeat Steps 1through 4 for the RemoveDataBars macro.</b>

The buttons you create come with a default name, such as Button3. To rename a button, right-click the button and then click the existing name. Then you can delete the existing name and replace it with a name of your choosing.

</div><span class="text_page_counter">Trang 5</span><div class="page_container" data-page="5">

Keep in mind that all controls on the Form Controls menu work in the same way as the command button, in that you can assign a macro to run when the control is selected.

Notice the Form Controls and ActiveX Controls shown earlier (refer to Figure 11-8).

Although they look similar, they’re quite different. Form controls are designed specifically for use on a worksheet, and ActiveX controls are typically used on VBA-driven UserForms. As a general rule, you should always use Form controls when working on a worksheet. Why? Form controls need less overhead, so they perform better, and configuring Form controls is far easier than configuring their ActiveX counterparts.

<b>Tạo navigation buttons </b>

The most common use of macros is navigation. Workbooks that have many worksheets or tabs can be frustrating to navigate. To help your audience, you can create

some sort of a switchboard, like the one shown in Figure 11-11. When users click the Example 1 button, they’re taken to the Example 1 sheet.

Creating a macro to navigate to a sheet is quite simple:

</div><span class="text_page_counter">Trang 6</span><div class="page_container" data-page="6">

<b>2.Startrecordingamacro.3. </b><i><b>While recording, click the destination sheet (the sheet this macro will</b></i>

<b>4. After you click in the destination sheet, stop recording the macro.</b>

If you need help assigning a macro to a button, check out the “Running your macros” section, earlier in this chapter

Dynamically rearranging pivot table data

<small>In Figure 11-12, macros allow a user to change the perspective of the chart simplyby selecting any one of the buttons shown.</small>

<small>Figure 11-13 reveals that the chart is actually a pivot chart tied to a pivot table. Therecorded macros assigned to each button are doing nothing more than rearranging the pivot table toslice the data using various pivot fields.</small>

</div><span class="text_page_counter">Trang 7</span><div class="page_container" data-page="7">

<small>Here are the high-level steps needed to create this type of setup:</small>

<b>1. <small>Create the pivot table and then add a pivot chart by clicking inside the</small></b>

<small>262 PART4</small> <b><small>AdvancedReportingTechniques</small></b>

<b>3. <small>While recording, move a pivot field from one area of the pivot table to</small></b>

<b>4. <small>Record another macro to move the data field back to its original position.</small>5. <small>After both macros are set up, assign each one to a separate button.</small></b>

<small>You can fire your new macros in turn to see the pivot field dynamically move back</small>

</div><span class="text_page_counter">Trang 8</span><div class="page_container" data-page="8">

<small>Offering one-touch reporting options</small>

<small>The two earlier macro examples demonstrate that you can record any action thatyou find of value. That is, if you think users would appreciate a certain featurebeing automated for them, why not record a macro to do so?</small>

<small>In Figure 11-14, notice that you can filter the pivot table for the top or bottom 20customers. Because the steps to filter a pivot table for the top and bottom 20 havebeen recorded, anyone can get the benefit of this functionality without knowinghow to do it themselves. Also, recording specific actions allows you to manage riska bit. That is to say, you’ll know that your users will interact with your reports ina method that has been developed and tested by you.</small>

<small>This not only saves them time and effort but also allows users who don’t knowhowtotaketheseactionstobenefitfromthem.Figure 11-15 demonstrates how you can give your audience a quick and easy wayto see the same data on different charts. Don’t laugh too quickly at the uselessnessof this example. It’s not uncommon to be asked to see the same data differentways. Rather than take up real estate, just record a macro that changes the charttype. Your clients can switch views to their hearts’ content</small>

</div><span class="text_page_counter">Trang 9</span><div class="page_container" data-page="9">

Finding Form controls

<small>Select the Developer tab and choose the Insert command, as shown in Figure 11-16.Here, you find two sets of controls: Form controls and ActiveX controls. Formcontrols are designed specifically for use on a worksheet, whereas ActiveX controls are typically usedon Excel UserForms. Because Form controls can be configured far more easily than their ActiveXcounterparts,yougenerallyshoulduse</small>

<small>Here are the nine Form controls that you can add directly to a worksheet, as shownin Figure 11-17:</small>

<b>» <small>Button: Executes an assigned macro when a user clicks the button.</small></b>

<b>» <small>Combo Box: Gives a user an expandable list of options from which to choose.</small></b>

<b>» <small>Check Box: Provides a mechanism for a select/deselect scenario. When</small></b>

<small>selected, it returns a value of True. Otherwise, it returns False.</small>

<b>» <small>Spin Button: Enables a user to easily increase or decrease a value by clicking</small></b>

<small>the up and down arrows.</small>

</div><span class="text_page_counter">Trang 10</span><div class="page_container" data-page="10">

<b>» <small>List Box: Gives a user a list of options from which to choose.</small></b>

</div><span class="text_page_counter">Trang 11</span><div class="page_container" data-page="11">

<b>» <small>Scroll Bar: Enables a user to scroll to a value or position using a sliding scale</small></b>

<b>» <small>Label: Allows you to add text labels to your worksheet. You can also assign a</small></b>

<small>macro to the label, effectively using it as a button of sorts.</small>

<b>» <small>Group Box: Typically used for cosmetic purposes, this control serves as a</small></b>

<small>container for groups of other controls</small>

Adding a control to a worksheet

<small>To add a control to a worksheet, simply click the control that you require and clickthe approximate location where you want to place the control. You can easily moveand resize the control later, just as you would a chart or shape</small>

<small>After you add a control, you configure it to define its look, behavior, and utility.Each control has its own set of configuration options that allow you to customizeit for your purposes. To get to these options, right-click the control and selectFormat Control from the menu that appears. This opens the Format Control dialogbox, illustrated in Figure 11-18, with all the configuration options for that control</small>

</div><span class="text_page_counter">Trang 12</span><div class="page_container" data-page="12">

<small>Each control has its own set of tabs that allow you to customize everything fromformatting to security to configuration arguments. You see different tabs based onwhich control you’re using, but most Form controls have the Control tab, wherethe meat of the configuration lies. There, you find the variables and settings thatneedtobedefinedforthecontroltofunction.The Button and Label controls don’t have the Control tab. They have no need forone. The button simply fires whichever macro you assign it. As for the label, it’s</small>

<small>Throughout the rest of this chapter, you walk through a few exercises that demonstrate how to use themostusefulcontrolsinareportingenvironment.Attheend of this chapter, you’ll have a solid understanding of Form controls and howthey can enhance your dashboards and reports</small>

<b>Using the Button Control </b>

<small>The Button control gives your audience a clear and easy way to execute the macrosyou’ve recorded. To insert and configure a Button control, follow these steps:</small>

<b>1.<small>Click the Insert drop-down list under the Developer tab.</small></b>

<b>3. <small>Click the location in your spreadsheet where you want to place thebutton.</small></b>

<b>4. <small>In the Assign Macro dialog box, assign a macro to the button.</small>5. <small>Edit the text shown on the button by right-clicking the button, highlighting the existing</small></b>

<small>To assign a different macro to the button, simply right-click and select AssignMacro from the menu that appears in order to reactivate the Assign Macro</small>

<small>When you add macros to a workbook, you have to save that workbook as an.xlsm file in order to share your macros with others. If you save the workbookas a standard .xlsx file, Excel strips your macros out of the workbook</small>

<b>Setting up trusted locations </b>

If the thought of any macro message coming up (even one time) unnerves you,

<i>you can set up a trusted location for your files. A trusted location is a directory</i>

deemed a safe zone where only trusted workbooks are placed. A trusted location

</div><span class="text_page_counter">Trang 13</span><div class="page_container" data-page="13">

allows you and your clients to run a macro-enabled workbook with no security restrictions as long as the workbook is in that location.

To set up a trusted location, follow these steps:

<b>1. Select the Macro Security button on the Developer tab.</b>

This step opens the Trusted Locations pane, shown in Figure 11-10. There, you see all the directories that Excel considers trusted.

<b>4. Click Browse to find and specify the directory that will be considered a</b>

After you specify a trusted location, any Excel file that’s opened from this location will have macros automatically enabled. Have your clients specify a trusted location and use your Excel files from there

</div><span class="text_page_counter">Trang 14</span><div class="page_container" data-page="14">

Sử dụng conditional formating

Có 5 quy tắc conditional formating có thể áp dụng cho dữ liệu: Highlight rules, Top/Bottom Rules, Data Bars, Color Scales và Icon Sets.

Đối với Highlight rules chúng ta có thể đặt điều kiện hiển thị các giá trị trong dữ liệu. Các 7 loại điều kiện:

Một lưu ý là khi chúng ta thiết lập rules cho dữ liệu thì khi thay đổi dữ liệu các rules này vẫn giữ nguyên.

Đối với Top/Bottom rules chúng ta cũng có các điều kiện cho dữ liệu

</div><span class="text_page_counter">Trang 15</span><div class="page_container" data-page="15">

Một lưu ý là các ơ dữ liệu có thể có nhiều rule, do đó để bỏ một rules áp dụng trên một ô chúng ta chọn Conditional Formatting  Clear Rules. Chúng ta sẽ chọn là xóa bỏ rule cho tồn bộ sheet hoặc chỉ cho ơ lựa chọn mà thơi.

Data bars là một cách formating khác, trong đó các thanh đồ thị thay đổi tùy vào giá trị của dãy dữ liệu.

</div><span class="text_page_counter">Trang 16</span><div class="page_container" data-page="16">

Tương tự chúng ta cũng có Color Scales và Icon sets

</div><span class="text_page_counter">Trang 17</span><div class="page_container" data-page="17">

Chúng ta cũng có thể tự tạo ra rules cho dãy dữ liệu bằng cách chọn New Rule

Có nhiều rules để cho bạn lựa chọn

</div><span class="text_page_counter">Trang 18</span><div class="page_container" data-page="18">

Data Bars, Color Scales, và Icon Sets chỉ có thể được sử dụng với Format All Cells Based on Their Values.

Đối với Icon sets rule, trong nhiều trường hợp chúng ta chỉ muốn hiển thị một icon duy nhất mà thơi, ví dụ chúng ta chỉ muốn hiển thị những giá trị nào dưới ngưỡng trung bình mà thơi. Để làm điều đó chúng ta thực hiện các bước sau:

</div><span class="text_page_counter">Trang 19</span><div class="page_container" data-page="19">

Chúng ta chọn dãy dữ liệu (lúc này đã có Icon set rules ở các ơ đó), chọn Manage Rules sau đó chúng ta chọn New Rule.

Chúng ta chọn như hình trên để thiết lập no format set cho các ơ có giá trị lớn hơn trung bình của dãy số liệu.

ở màn hình Manage Rules chúng ta click vào ô Stop If True của Rule Cell Value > …

</div><span class="text_page_counter">Trang 20</span><div class="page_container" data-page="20">

Kết quả cho thấy chỉ có các giá trị dưới trung bình mới hiển thị icon.

Đối với Data bars, các thanh thường hiển thị ngay trong ô dữ liệu. Điều này dẫn đến đôi khi chúng ta khơng thể đọc được dữ liệu và cũng khó có thể thấy đầu cuối của thanh đồ thị. Để hiển thị các thanh đồ thị bên ngồi ơ dữ liệu chúng ta làm như sau

Chúng ta copy dữ liệu sang cột kế bên. Sau đó áp dụng Data Bars Formating cho cột dữ liệu đó.

</div><span class="text_page_counter">Trang 21</span><div class="page_container" data-page="21">

Chúng ta click vào ô Show Bar Only

Kết quả như hình trên đây. Cột kế bên cột Sale chỉ thể hiện thanh đồ thị mà khơng có số liệu.

Sử dụng Sparklines

Sparkline chỉ được áp dụng trong ô và cho một series dữ liệu số mà thơi.

Có 3 dạng Sparkline trong Excel: Line, Column và Win/Loss. Win/Loss sẽ trình bày dữ liệu dương là win còn dữ liệu âm sẽ là loss.

</div><span class="text_page_counter">Trang 22</span><div class="page_container" data-page="22">

Chúng ta có thể thay đổi kích thước của Sparkline bằng cách thu nhỏ ơ hoặc kéo dài ơ hoặc thậm chí merge các ơ lại với nhau để làm cho Sparkline dài ra hoặc co lại.

Tuy nhiên khi làm vậy tỷ lệ hình hiển thị sẽ rất khó để người đọc nhìn rõ. Tỷ lệ hình chuẩn cho Sparkline phải là chiều rộng gấp đơi chiều cao của Sparkline.

</div><span class="text_page_counter">Trang 23</span><div class="page_container" data-page="23">

Trong hình trên Sparkline trong ơ M là hình chuẩn nhất.

Sparkline thường được trình bày ở cuối dãy số liệu. Trong một số trường hợp chúng ta chỉ muốn trình bày sparkline mà khơng phải là dãy số liệu thì chúng ta có thể hidden số liệu đi.

Đối với các ơ dữ liệu khơng có giá trị thì khi hiển thị trên sparkline có thể hiển thị dưới các dạng khác nhau. Để làm điều đó chúng ta chọn Sparkline Tools chọn thẻ Edit Data ➪ Hidden & Empty Cells và sau đó chọn loại hiển thị (Gaps, Zero hay Connect data points with line).

Chúng ta cũng có thể tạo đường referrence line trong sparkline

</div><span class="text_page_counter">Trang 24</span><div class="page_container" data-page="24">

Giả sử chúng ta có bảng dữ liệu trên và chúng ta có monthly goal là 500. Chúng ta muốn tạo đường referrence line để xem các sparkline có vượt quá referrence line hay không

Chúng ta cần tạo ra một bảng dữ liệu khác trong đó chúng ta so sánh monthly values hàng tháng với monthly goal là 500 bằng cách sử dụng công thức nếu monthly value > goal thì để 1 và < goal thì để -1.

=IF(B6>$C$2,1,-1)

</div><span class="text_page_counter">Trang 25</span><div class="page_container" data-page="25">

Chúng ta lại dùng sparkline Win/Loss để vẽ sparkline cho dữ liệu mới.

Tiếp theo chúng ta lại tạo bảng dữ liệu lấy monthly value của tháng sau trừ cho tháng trước

Chúng ta vẽ sparkline dạng line cho bảng này. Trong phần Axis setting chúng ta đặt Axis là 500 thì sẽ tạo ra đường referrence line như hình trên.

Trong trường hợp chúng ta muốn tạo sparkline theo ngày, theo tháng hoặc theo năm, nhưng các khoảng thời gian lại không cách đều nhau như dưới đây

</div><span class="text_page_counter">Trang 26</span><div class="page_container" data-page="26">

Nếu chúng ta vẽ sparkline cho các ngày không cách đều nhau như vậy thì sparkline sẽ khơng đúng.

Để vẽ đúng chúng ta phải chọn Sparkline ➪ Axis ➪ Date Axis Type

Excel hỏi chúng ta chọn vùng thiết lập Date Axis Type, chúng ta chọn cột Date thì khi đó Sparkline sẽ thể hiện đúng ngày trong cột Date

Để sparkline tự động cập nhật dữ liệu khi chúng ta thêm dữ liệu mới vào bảng dữ liệu thì chúng ta phải tạo bảng cho dữ liệu thì sao đó khi thêm hàng hoặc cột thì sparkline cũng tự động cập nhật.

</div><span class="text_page_counter">Trang 27</span><div class="page_container" data-page="27">

Sử dụng symbols để tăng cường báo cáo

Giả sử chúng ta muốn vẽ chart với các kí hiệu tăng hoặc giảm giống như hình dưới. Nếu dùng conditional formating thì chúng ta khơng thể thực hiện được

Để thực hiện điều này chúng ta làm các bước sau:

Trước hết chúng ta tạo các symbol tăng và giảm bằng cách dùng Insert chọn symbol cần chèn

Chúng ta sẽ chèn hai kí hiệu tăng và giảm vào ơ C1

</div><span class="text_page_counter">Trang 28</span><div class="page_container" data-page="28">

Sau đó chúng ta vào cột vs prior month quét dữ liệu click phải chọn Format Cells chọn Custom.

Chúng ta copy các symbols trong ô C1 vào ô Type và định dạng như trong hình. Khi đó nếu tỷ lệ phần trăm dương thì sẽ có thêm dấu tăng cịn nếu giảm sẽ thêm dấu giảm.

Như vậy cột vs prior month đã có các dấu kí hiệu tăng và giảm như mong muốn. Sau đó chúng ta chỉ cầnchọn ba cột và insert bar chart là được

Sử dụng công cụ Magical Camera Tools

Để sử dụng cơng cụ này chúng ta cần kích hoạt nó trên thanh công cụ của Excel.

</div><span class="text_page_counter">Trang 29</span><div class="page_container" data-page="29">

Chúng ta nhận thấy một icon camera xuất hiện trên thanh cơng cụ.

Giả sử chúng ta có một range dữ liệu và chart biểu đổ cho range dữ liệu đó.

</div><span class="text_page_counter">Trang 30</span><div class="page_container" data-page="30">

Chúng ta chọn từ B3:F13 (chọn các cột chứa biểu đồ), sau đó click vào nút camera trên thanh quick access tool.

Chúng ta chọn một ô bất kỳ nào dưới biểu đồ góc để tạo một picture chứa biểu đồ đó. Khi chúng ta thay đổi dữ liệu trong range thì hình chart cũng thay đổi theo ln.

Chúng ta cũng có thể áp dụng cho range dữ liệu. Ứng dụng của Camera tool này bao gồm:

 Gom nhiều bảng dữ liệu vào dashboard: chúng ta có thể chụp nhiều dữ liệu tại

</div><span class="text_page_counter">Trang 31</span><div class="page_container" data-page="31">

Trong hình trên dashboard này có hình dữ liệu từ sheet 1 chứa dữ liệu của bảng ở trên biểu đồ, sheet 2 và sheet 3 là chart. Tất cả được gom chung vào một biểu đồ.  Có thể xoay hình tiết kiệm thời gian: có nhiều chart chỉ hiển thị theo chiều dọc

mà khơng có chiều ngang. Chúng ta có thể sử dụng hình chụp từ camera và xoay theo chiều ngang để được hình theo chiều ngang mà khơng cần phải chỉnh sửa.

 Tạo ra chart có kích thước nhỏ: vì hình chụp bằng camera có thể thay đổi kích thước mà khơng ảnh hưởng đến dữ liệu trong hình, do đó chúng ta có thể thu nhỏ chart sao cho phù hợp với dashboard.

Sử dụng line chart

Trong line chart trục tung luôn luôn phải bắt đầu từ số 0

</div><span class="text_page_counter">Trang 32</span><div class="page_container" data-page="32">

Cả hai line chart đều trình diễn cùng một dãy dữ liệu tuy nhiên hình trên trình bày theo khoảng dữ liệu mặc định bắt đầu từ 96 cho đến 110, cịn hình dưới bắt đầu từ 0. Nếu nhìn vào hình trên chúng ta nhận thấy xu hướng có vẻ thay đổi rất đáng kể tuy nhiên ở hình dưới chúng ta thấy sự thay đổi này khơng nhiều vì giá trị chỉ dao động từ 100 đến 107.

</div><span class="text_page_counter">Trang 33</span><div class="page_container" data-page="33">

Trong trường hợp dãy số liệu của chúng ta chạy từ giá trị cực nhỏ đến giá trị cực lớn, khi trình bày line chart thì sẽ khơng thể trình bày chính xác được xu hướng của dãy số liệu.

Hình trên cho thấy dữ liệu 2019 tăng từ 400 lên 11,100 còn dữ liệu của 2020 tăng từ 50 lên 398. Đường biểu diễn của năm 2020 nằm sát dưới đáy trục hoành do đó khó có thể đánh giá được xu hướng của chúng.

Trong trường hợp này chúng ta cần chuyển sang thang đo logarith scale cho cả hai dãy số liệu. Khi đó xu hướng mới có thể thể hiện rõ ràng.

</div><span class="text_page_counter">Trang 34</span><div class="page_container" data-page="34">

Để có thể biểu diễn line chart dưới dạng logarith chúng ta click phải trục tung chọn Format Axis chọn Axis Options tick vào dấu logarith scale.

Lưu ý thang đo logarith scale chỉ áp dụng cho số dương.

So sánh các xu hướng dữ liệu trong cùng một đường

Giả sử chúng ta muốn vẽ line chart cho nhiều năm nhưng là một đường duy nhất để theo dõi tính liên tục của dữ liệu như sau:

</div><span class="text_page_counter">Trang 35</span><div class="page_container" data-page="35">

Trong hình trên mỗi đường sẽ có một hình khác nhau thể hiện rõ rệt ba năm khác nhau. Để có thể vẽ đường này chúng ta lập dữ liệu như sau:

So sánh hai xu hướng bằng biểu đồ dây và cột

Chúng ta có thể so sánh xu hướng của hai năm bằng cách sử dụng line chart cho 1 năm và bar chart cho 1 năm như ví dụ dưới đây:

Để tạo ra đồ thị như thế này chúng ta làm như sau:

</div><span class="text_page_counter">Trang 36</span><div class="page_container" data-page="36">

Sau đó chúng ta tơ màu bảng dữ liệu chọn InsertColumn chart để vẽ column chart cho dữ liệu.

Sau đó click chọn bất kì cột nào của năm 2021 rồi chọn Change Series Chart Type từ menu xuất hiện.

Lưu ý cách hiển thị như thế này chỉ có thể áp dụng cho 2 năm mà thôi. Nếu nhiều quá 2 năm thì đồ thị sẽ rối mắt.

So sánh hai xu hướng có đơn vị đo lường khác nhau

Giả sử chúng ta muốn vẽ số lượng và tỷ lệ phần trăm trên cùng chart. Hai cột này có đơn vị đo lường khác nhau. Do đó nếu vẽ line chart thì sẽ như thế này:

Như vậy chart này khơng đúng. Để vẽ đúng chúng ta làm như sau:

</div><span class="text_page_counter">Trang 37</span><div class="page_container" data-page="37">

Quét bảng dữ liệu chọn InsertLine chart

Click chuột phải vào data series và chọn Format Data Series từ menu. Cửa sổ Format Data Series mở ra. Chúng ta mở rộng Series Options và sau đó chọn vào Secondary Axis radio button

</div><span class="text_page_counter">Trang 38</span><div class="page_container" data-page="38">

Khi đã vẽ được secondary rồi chúng ta có thể chuyển tỷ lệ phần trăm thành cột cũng được

So sánh đường xu hướng với target range

Giả sử chúng ta muốn so sánh giá trị hiện tại với khoảng target trên và dưới như hình dưới đây

</div><span class="text_page_counter">Trang 39</span><div class="page_container" data-page="39">

Để vẽ được đường này chúng ta làm như sau - Tạo bảng mồi như sau

Với bảng mồi này chúng ta nhập cơng thức để tính lower and upper limit - Tiếp theo chúng ta nhập hàng giá trị cần so sánh

- Chúng ta chọn toàn bộ bảng mồi Insert Stacked column

- Chọn cột Values Change Chart Type  chọn Value là Line và tick vào secondary axis

</div><span class="text_page_counter">Trang 40</span><div class="page_container" data-page="40">

- Click phải cột lower Limite Chọn icon fillno Fill. Sau đó chọn icon Border chọn No Border. Mục đích của bước này là làm mất đi vùng lower Limit.

- Click phải vùng Upper Limit Format Data Series chỉnh Gap Width thành 0%.

Thêm đường forecast cho line chart

Giả sử chúng ta có bảng dữ liệu sau

</div>

×