Power BI-Power Query formulas to achieve Jiujiuchengfa

Recently bet all right, began to study the use of Power BI, mainly in the form of cases, this time the case is how to achieve Jiujiuchengfa formulas.

First, look at the effect chart and ultimately, I did not use Power BI Desktop, which is used directly Excel2016

2019-08-17_101402

I realize the following steps:

  1. First, start Excel and create a blank Excel workbook file;
  2. Next, create a blank worksheet shown in Table 10 the data of a following row 9, row numbers as the first label, the first label column behavior, wherein the data area can be left blank;

    Figure -1 blog

  3. Select the whole table, expand the Data tab, click "from the table", the entry table is converted to Power Query of Queries

    Figure -1 blog

    Figure -1 blog

  4. Select the column number for all columns 1-9, expand the "Convert" tab, select the "replacement value", will replace any null character on the line, because then the need for Unpivot column processing, value can not be empty

    Figure-2 blog

  5. The results remain the previous step in all of the columns in step is selected, clicking "inverse perspective column" button, as shown below to give

    Figure -1 blog

  6. The "Attribute" column of the data type is modified "integer"

    Figure -1 blog

  7. Go to "Add Column" tab, click "customize columns" button to customize the formula is:
    IF = [row]> = [Properties] then Number.ToText ([OK]) & " * " & Number.ToText ([Properties]) & " = " & Number.ToText ([row] * [Properties]) the else  ' "

    Formula meanings:

    When the value of the column [row] not less than [Properties] value, returning the corresponding text string multiplication formulas, or null otherwise, it can guarantee the final formulas front side is blank.

    Multiplication formulas in the corresponding text, are achieved by the connection string, attention Power Query, the data type is important and must be explicitly conversion process. So here used Number.ToText

    Figure -1 blog

  8. The extra "value" column deleted
  9. Select "Properties" column

    Figure -1 blog

    Figure -1 blog

  10. Finally, click "Close and upload", the result can be loaded into Excel.

Guess you like

Origin www.cnblogs.com/alexywt/p/11368055.html