Power BI- Group By, Pivot and Unpivot

Vaishali
3 min readOct 20, 2019

--

IMPORT DATA:-

  • The first step GET DATA to connect to the SQL server. And provide the Server name and Database name.
GET DATA FROM SQL SERVER
  • Select Table and Load into Power BI
SELECT TABLE
  • Input table:-
STUDENT TABLE
  • Next, click on the Edit Query tab.
TRANSFORM TAB

Group By:-

  • Group by query editor, group value in multiple rows. It is useful to summarizing value like count, sum, average, etc.
  • Specify the columns to group by and one or more outputs.
GROUP BY QUERY EDITOR
  • When we click on ok, display the result.
RESULT
  • Add grouping and Add aggregation uses to more grouping and aggregation to Group By operation.
ADVANCED GROUP BY QUERY EDITOR
  • When we click on ok, display the result.
RESULT

Replace Value:-

  • It can replace any value with the new value.
  • For replace the value, clicks on Replace value on the Transform Tab
REPLACE OPTION
  • Next, pop-up window display, First select the column then to fill the field.
  • By using replace value it changes the Original value maths change to an m1 value.
REPLACE VALUE EDITOR
  • When we click on ok, display the result.
RESULT

PIVOT:-

  • Pivot converts data from row-level to column level.
INPUT TABLE
  • Select the column and click on the Pivot option.
  • In the pivot, English, and Maths subject converts to a column.
PIVOT OPTION
  • Next to fill the field like values column and click on ok.
PIVOT COLUMN
  • When we click on ok, display the result.
RESULT

UNPIVOT:-

  • Unpivot converts data from column level to row-level.
INPUT TABLE
  • Select the column and click on the Unpivoted Only Selected Columns option. Then click on ok.
UNPIVOT
  • When we Click on ok display the result.
  • In Unpivot English and Maths Subject column convert into row- level.
RESULT

If you are a newbie to Power BI starts with the following must-watch video:-

--

--

Responses (1)