0% found this document useful (0 votes)
36 views68 pages

r22 Manual Master

rsd

Uploaded by

chintalavenu05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views68 pages

r22 Manual Master

rsd

Uploaded by

chintalavenu05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

Department OfComputerScience&Engineering

MASTERMANUAL

Name oflab :DataVisualization-RProgrammingLAB

Class :IIYearISemester

Branch :ComputerScience&Engineering

Regulation:R22

A.Y. :2023-2024
DepartmentVision

To create the next generation and globally competent data scientists / data engineers in the field
ofDataSciencedomainbyprovidingqualityengineeringeducationalongwithcuttingedgetechnologies.

DepartmentMission
To provide value based engineering education through continues learning and research
byimparting solid foundation in applied mathematics, algorithms and programming paradigms
tobuildsoftwaremodels andsimulations.

Todevelopconceptsbuilding,logicalandproblemsolvingskillsofgraduatestoaddresscurrentglobalcha
llengesofindustryandsociety.

Tooffer
excellenceinteachingandlearningprocess,industrycollaborationactivitiesandresearchtomouldgradua
tesintoindustryreadyprofessionals.
PROGRAMEDUCATIONALOBJECTIVES(PEO):

PEO1:Topreparegraduateswithavariedrangeofexpertiseindifferent
aspectsofdatasciencesuchasdatacollection,processing,modelingandvisualizationoflargedatasets.

PEO 2: To acquire good knowledge of both theory and application of


appliedstatistics,mathematicsandcomputersciencebasedexistingdatasciencemodelstoanalyzehuged
ata setsoriginatingfromdifferentapplicationareas.

PEO3:Tocreatemodelsusingtheknowledgeacquired fromthe
programtosolvefuturechallengesandreal-worldproblemsrequiringlargescaledataanalysis.

PEO4:.Tomakebettertrainedprofessionalstocaterthegrowingdemandfordatascientists,dataanalysts,
dataarchitects anddataengineersinindustry.
SD309PC:SkillDevelopment Course(DataVisualization-PowerBI)

IIYearB.TechCSE-I-Semester

PrerequisitesoftheCourse
Itisessentialyouunderstandthefaceofcontemporarywebdevelopmenttoattendthiscourse.

CourseObjectives

 EffectiveuseofPowerBI toapplydatavisualization.
 Todiscernpatternsandrelationshipsinthe data.
 TobuildDashboardapplicationsAddstateandpropstoanapplication
 Tocommunicatetheresultsclearlyandconcisely.
 Tobeabletoworkwithdifferentformats ofdatasets.

CourseOutcomes

 UnderstandHowtoimportdataintothePowerBI.
 UnderstandPowerBI conceptsofDimensionsandMeasures.
 DevelopProgramsandunderstandhowtomap VisualLayoutsandGraphicalProperties.
 CreateaDashboardthatlinksmultiplevisualizations.
 UsegraphicaluserinterfacestocreateFramesforprovidingsolutionstorealworld.

4
LabProblems:

1. UnderstandingData,Whatisdata,wheretofinddata,Foundationsforbuildin
gDataVisualizations,CreatingYourFirstvisualization?

2. Getting started with PowerBI Software using Data file


formats,connecting your Data to PowerBI , creating basic charts (line,
bar charts, Treemaps),UsingtheShowmepanel.

3. PowerBI
Calculations,OverviewofSUM,AVR,andAggregatefeatures,Creatingcustomca
lculationsandfields.

4. Applyingnew
datacalculationstoyourvisualizations,FormattingVisualizations, Formatting
Tools and Menus, Formatting specific parts of theview.

5. EditingandFormattingAxes,ManipulatingDatainPowerBIdata,PivotingPowerBIdata.

6. Structuringyourdata,SortingandfilteringPowerBIdata,PivotingPowerBIdata.

7. AdvancedVisualizationTools:UsingFilters,Using the Detail panel, using


theSize panels, customizing filters, Using and Customizing tool tips,
Formattingyourdatawithcolors.

8. CreatingDashboards&Storytelling,creatingyourfirst dashboardand
Story, Design for different displays, adding interactivity to your
Dashboard,Distributing&PublishingyourVisualization.

9. PowerBI filetypes,publishingtoPowerBIOnline,Sharingyourvisualizations,printing,andExporting.

10. Creating customcharts,cyclicaldata andcircularareacharts,DualAxischarts.

5
LABCODE

 Studentsshouldreporttotheconcernedlabasperthetimetable.
 Studentswhoturnuplateto thelabswillin
nocasebepermittedtodotheprogramschedulefortheday.
 After completionoftheprogram,certificationoftheconcerned staffin-
chargeintheobservationbookisnecessary.
 Studentsshouldbringanotebookof100pagesandshouldenterthereadings/observationsintothen
otebookwhile performingtheexperiment.
 Therecordofobservationsalong withthe
detailedexperimentalprocedureoftheexperimentintheimmediatelastsessionshouldbesubmitted
andcertifiedstaffmemberin-charge.
 Thegroup-
wisedivisionmadeinthebeginningshouldbeadheredtoandnomixupofstudentsamongdiffer
entgroupswillbepermitted.
 Whentheexperimentiscompleted,shoulddisconnectthesetupmadebythem,andshouldre
turnallthecomponents/instrumentstakenforthepurpose.
 Any damage of the equipment or burn-out components will be viewed seriously either
byputtingpenaltyor bydismissing thetotalgroupofstudentsfromthelabforthesemester/year.
 Studentsshouldbepresentinthe labsfortotalscheduledduration.
 Studentsarerequired topreparethoroughlytoperformtheexperimentbeforecoming
tolaboratory.

6
INDEX
Experiment
NameoftheExperiment
No.

1. Understanding Data,What is data, where to find data,


FoundationsforbuildingDataVisualizations,CreatingYourFirstvisu
alization?
2. Gettingstartedwith
PowerBISoftwareusingDatafileformats,connectingyourD
atato PowerBI,creatingbasic
charts(line,barcharts,Treemaps),Using theShowmepanel.
3. PowerBICalculations,OverviewofSUM,AVR
,andAggregatefeatures,Creatingcustomcalcul
ationsandfields.

4. Applyingnewdatacalculationstoyourvisualizations,Formatting
Visualizations,FormattingToolsandMenus,Formattingspecificparts
oftheview
5. EditingandFormatting Axes,ManipulatingDatain PowerBI
data,Pivoting PowerBIdata
6. Structuringyourdata,Sortingand filtering PowerBIdata,Pivoting
PowerBIdata.
7. Advanced Visualization Tools:Using Filters,Using the
Detailpanel,usingtheSizepanels,customizingfilters, Usingand
Customizingtooltips,Formattingyour datawithcolors.
8 Creating Dashboards & amp;Story telling,creating your
firstdashboard and Story, Design for different
displays,addinginteractivitytoyourDashboardDistributing&am
p;Publishing
yourVisualization
9. PowerBI filetypes, publishingto
PowerBIOnline,Sharingyourvisualizations,printi
ngand Exporting.
Creatingcustomcharts,cyclicaldataandcircularareacharts,DualAxis
10. charts

7
Getting Started with Power BI
Introduction:
Microsoft Power BI is a collection of software services, apps, and connectors that work together to turn your
unrelated sources of data into coherent, visually immersive, and interactive insights. Whether your data is a
simple Microsoft Excel workbook, or a collection of cloud-based and on-premises hybrid data warehouses,
Power BI lets you easily connect to your data sources, visualize (or discover) what's important, and share
that with anyone or everyone you want.

Power BI can be simple and fast, capable of creating quick insights from an Excel workbook or a local
database. But Power BI is also robust and enterprise-grade, ready not only for extensive modeling and real-
time analytics, but also for custom development. Therefore, it can be your personal report and visualization
tool, but can also serve as the analytics and decision engine behind group projects, divisions, or entire
corporations. If you're a beginner with Power BI, this module will get you going. If you're a Power BI
veteran, this module will tie concepts together and fill in the gaps.

The parts of Power BI

Power BI consists of several elements that all work together, starting with these three basics:

 A Windows desktop application called Power BI Desktop.


 An online software as a service (SaaS) service called the Power BI service.
 Power BI Mobile apps for Windows, iOS, and Android devices.

8
These three elements—Desktop, the service, and Mobile apps—are designed to let people create, share, and
consume business insights in the way that serves them, or their role, most effectively

How Power BI matches your role

How you use Power BI might depend on your role on a project or a team. And other people, in other roles,
might use Power BI differently, which is just fine.

For example, you might view reports and dashboards in the Power BI service, and that might be all you do
with Power BI. But your number-crunching, business-report-creating coworker might make extensive use of
Power BI Desktop (and publish Power BI Desktop reports to the Power BI service, which you then use to
view them). And another coworker, in sales, might mainly use her Power BI phone app to monitor progress
on her sales quotas and drill into new sales lead details.

You also might use each element of Power BI at different times, depending on what you're trying to achieve,
or what your role is for a given project or effort.

Perhaps you view inventory and manufacturing progress in a real-time dashboard in the service, and also use
Power BI Desktop to create reports for your own team about customer engagement statistics. How you use
Power BI can depend on which feature or service of Power BI is the best tool for your situation. But each
part of Power BI is available to you, which is why it's so flexible and compelling.

We discuss these three elements—Desktop, the service, and Mobile apps—in more detail later. In upcoming
units and modules, we'll also create reports in Power BI Desktop, share them in the service, and eventually
drill into them on our mobile device.

9
Download Power BI Desktop

You can download Power BI Desktop from the web or as an app from the Microsoft Store on the Windows
tab.

Download Strategy Link

Download from web Download .msi (https://go. microsoft.com/


fwlink/?LinkID=521662)

POWERBI DOWNLOAD AND INSTALLATION

1. Go to goggle and type https://go. microsoft.com/ fwlink/?LinkID=521662

2. Download

3. Select Language

10
4. Click next

5. Accept the terms in the License Agreement

11
6. Select the destination folder to install

7. When it’s ready for installation click Install

12
8. Processing for installation click next

9. After successful installation click on finish

10. Finally Power BI is installed

13
14
EXPERIMENT-1

Aim:

Understanding Data, What is data, where to find data, Foundations for building Data
Visualizations, Creating Your First visualization?

Solution:

What is Data?
Data refers to raw facts, statistics, or information collected or stored in a structured or unstructured form.
Data can take various forms, such as text, numbers, images, videos, and more. It is the foundation of all
information and knowledge and is used in various fields for analysis, decision-making, and understanding
trends and patterns.

Data can be categorized into two main types:

 Structured Data: This type of data is organized into a specific format, such as tables or databases,
and is easily searchable and analyzable. Examples include spreadsheets, relational databases, and
CSV files.
 Unstructured Data: Unstructured data lacks a specific format and can include text documents,
social media posts, images, audio recordings, and more. Analyzing unstructured data often requires
advanced techniques like natural language processing and image recognition.

Where to Find Data?


You can find data from various sources, depending on your specific needs:

 Open Data Portals: Many governments and organizations provide free access to a wide range of
data through open data portals. Examples include Data.gov (United States) and data.gov.uk (United
Kingdom).
 Data Repositories: Academic institutions, research organizations, and data enthusiasts often share
datasets on platforms like Kaggle, GitHub, and the UCI Machine Learning Repository.
 APIs (Application Programming Interfaces): Some websites and services offer APIs that allow
you to programmatically access and retrieve data. Examples include Twitter API, Google Maps API,
and financial market APIs.
 Web Scraping: You can extract data from websites using web scraping tools and libraries like
BeautifulSoup and Scrapy. However, be mindful of the website's terms of use and legal restrictions.
 Surveys and Surveys: You can conduct your own surveys or collect data through questionnaires and
interviews.
15
 IoT Devices: Internet of Things (IoT) devices generate vast amounts of data that can be used for
various purposes.
 Commercial Data Providers: Some companies specialize in selling datasets for specific industries,
such as market research, finance, and healthcare.

Foundations for Building Data Visualizations:


Creating effective data visualizations requires a strong foundation in several key areas:

 Data Analysis: Before creating visualizations, you should thoroughly analyze your data to
understand its structure, relationships, and any patterns or trends. Exploratory data analysis (EDA)
techniques can help with this.
 Statistical Knowledge: Understanding basic statistics is essential for making meaningful
interpretations of data. Concepts like mean, median, standard deviation, and correlation are
commonly used in data visualization.
 Domain Knowledge: Having knowledge of the specific domain or subject matter related to your
data is crucial for creating contextually relevant visualizations. It helps you ask the right questions
and provide valuable insights.
 Visualization Tools: Familiarize yourself with data visualization tools and libraries such as
matplotlib, Seaborn, ggplot2, D3.js, and Tableau. Each tool has its strengths and can be used for
different types of visualizations.
 Design Principles: Study design principles, including color theory, typography, and visual
hierarchy, to create visually appealing and effective visualizations. Avoid common pitfalls like
misleading visualizations.
 Interactivity: Learn how to add interactive elements to your visualizations to engage users and
allow them to explore the data. This can be achieved using tools like JavaScript, Python libraries, or
dedicated visualization software.

Creating Your First Visualization:


To create your first data visualization, follow these general steps:

 Select Your Data: Choose a dataset that aligns with your goals and interests. Ensure that the data is
clean and well-structured.
 Define Your Objective: Clearly define what you want to communicate or explore with your
visualization. Are you looking to show trends, comparisons, or distributions?
 Choose the Right Visualization Type: Select a visualization type that suits your data and
objectives. Common types include bar charts, line charts, scatter plots, histograms, and pie charts.
 Prepare and Transform Data: Preprocess your data as needed. This may involve aggregating,
filtering, or transforming the data to fit the chosen visualization.
 Create the Visualization: Use a suitable tool or library to create your visualization. Customize it
with labels, colors, and other design elements.
16
 Interactivity (Optional): If appropriate, add interactive features to your visualization to allow users
to interact with the data.
 Test and Iterate: Review your visualization for accuracy and clarity. Seek feedback from others and
make improvements as necessary.
 Publish or Share: Once you are satisfied with your visualization, publish it on a platform, embed it
in a report, or share it with your intended audience.
 Document and Explain: Provide context and explanations for your visualization. Clearly
communicate what the viewer should take away from it.
 Maintain and Update: If the data changes or new insights emerge, update your visualization
accordingly.
Example
1. Create your first visualization on list of UTS, States and Capitals of India.
Solution:
1. Open power BI.

2. Open Google download the link for map of India UTS, states and Capitals and past in PowerBI URL

17
3. Select Table 6

4. Transform the data and made the changes necessary and load data

18
5. Select the format you want to visualization.

6. Visualize your First Creation

19
Output:

20
EXPERIMENT-2

Aim:

Getting started with power BI Software using Data file formats, connecting your Data
to power BI, creating basic charts (line, bar charts, Tree maps), Using the Navigation
panel.

Solution:
Getting started with powerBI software is a great way to create data visualizations quickly and efficiently.
Here are the steps to get started, including connecting your data to powerbi, creating basic charts like line
charts, bar charts, and tree maps, and using the Show Me panel:

1. Download and Install PowerBI:


First,you'll need to download and install PowerBI Desktop Follow the installation instructions provided.

2. Prepare Your Data:


Before connecting your data to PowerBI, ensure that your data is in a suitable format. Common data file
formats that PowerBI supports include Excel (.xlsx), CSV (.csv), and pdf text files (.txt). Make sure your
data is organized with headers for each column.

3. Connect Your Data to PowerBI:


2.1 Launch PowerBI Desktop.
2.2 Click on Get Data
2.3 Choose the data source type (e.g., Excel, CSV, text file,pdf) and Select the data file(pdfsample) and
click "Connect".

21
2.4 Select Table 3

2.5 Transform Data and Load data into PowerBI


4. Data Source Pane:
Once your data is connected, the Data Source Pane will appear on the left-hand side of the PowerBI
interface. Here, you can see a preview of your data and perform data transformations.

22
5. Creating Basic Charts:
Now, let's create some basic charts using PowerBI:

A. Line Chart:
1. From the "Data Source pane", Select the columns and select Line chart
2. Then PowerBI will automatically create a line chart. You can customize it by adding labels, titles, and
formatting.

Output:

B. Bar Chart:
1. From the "Data Source pane", Select the columns and select bar chart
2. Then PowerBI will automatically create a bar chart. You can customize it by adding labels, titles, and
formatting.

23
Output:

C. Tree map:
1. Get the data from textfile
2. Select Tree map
3. PowerBI will create tree map visualization. You can further customize it
Output:

6. Using the Navigation Panel:


The Navigation Panel in PowerBI helps you explore various chart types based on your data and the fields
you select. Here's how to use it:
1. After adding fields to the Rows and Columns shelves, click on the "Navigation" panel located on the left
24
side of the PowerBI interface.
2. In the Navigation panel, you'll see a variety of chart options that PowerBI recommends based on your
data. Click on a chart type to create it.
3. PowerBI will automatically generate the selected chart type with your data. You can further customize it
as needed.

25
EXPERIMENT-3

Aim:

PowerBI Calculations, Overview of SUM, AVR, and Aggregate features, Creating


custom calculations and fields

Solution:

According to the Microsoft Power BI documentation, the CALCULATE function forms part of the filter
function category and is defined as "evaluating an expression in a modified filter context." An expression is
essentially a measure and includes functions such as SUM, AVERAGE, and COUNT. This expression is
evaluated in the context of one or more filters.

As you may know, filters can also be applied to a Power BI report simply by adding slicers without creating
a measure using the CALCULATE function at all. However, there are many use cases where the
CALCULATE function is more appropriate. It is especially useful to use it as a component of another
function. We will see how this works in the example below for calculating the percentage of a total.

1. PowerBI Calculations
1.1 Launch PowerBI Desktop.
1.2 Click on Get Data
1.3 Choose the data source type (e.g., Excel, CSV, text file,pdf) and Select the data file(Motorcars data) and
click "Connect".

1.4 Transform Data


1.5 In Power Query Editor select Group By for basic calculations

26
1.6 Next do advanced calculations in Group by Like Min Max and Avg Calculations

1.7 Create a Column chart


Output:

27
2. Creating custom calculations and fields
2.1 Go to transform data
2.2 Add columns select Custom Column

2.3 Create a new column and do custom calculations


Output:

28
EXPERIMENT-4
Aim:
Applying new data calculations to your visualizations, Formatting Visualizations,
Formatting Tools and Menus, Formatting specific parts of the view.
Solution:
Formatting Tools and Menus
Getting started with the formatting pane

If you have edit permissions for a report, there are numerous formatting options available. In Power BI
reports, you can change the color of data series, data points, and even the background of visualizations. You
can change how the x-axis and y-axis are presented. You can even format the font properties of
visualizations, shapes, and titles. Power BI provides you with full control over how your reports appear.

To get started, open a report in Power BI Desktop or the Power BI service. Both provide almost identical
formatting options. When you open a report in the Power BI service, be sure to select Edit from the menu
bar.

When you’re
editing a report and you have a visualization selected, the Visualizations pane appears. Use this pane to
change visualizations. Directly below the Visualizations pane, there are three icons: the Fields icon (a stack
of bars), the Format icon (a paint brush), and the Analytics icon (a magnifying glass). In the image below,
the Fields icon is selected, indicated by a yellow bar below the icon.

When you select Format, the area below the icon displays the customizations available for the currently
selected visualization.

29
You can customize many elements of each visualization. The options available depend on the visual
selected. Some of those options are:

 Legend
 X-axis
 Y-axis
 Data colors
 Data labels
 Total labels
 Shapes
 Plot area
 Title
 Background
 Lock aspect
 Border
 Shadow
 Tooltip
 Visual header
 Shapes
 Position
 Zoom

30
EXPERIMENT-5

Aim:

Editing and Formatting Axes, Manipulating Data in PowerBI Pivoting PowerBI data.

Solution:

Editing and formatting axis properties

It’s often useful to modify the X-axis or the Y-axis. Similar to working with colors, you can modify an axis
by selecting the down-arrow icon to the left of the axis you want to change, as shown in the following
image.

In the example below, we've formatted the Y axis by:

 Moving the labels to the right side of the visualization


 Changing the starting value to zero.
 Changing the label font color to black
 Increasing label font size to 12
 Adding a Y-axis title

31
You can remove the axis labels entirely, by toggling the radio button beside X-Axis or Y-Axis. You can also
choose whether to turn axis titles on or off by selecting the radio button next to Title.

Adding data labels

Let's add data labels to an area chart.

Here is the before picture.

And, here is the after picture.


32
We selected the visualization to make it active and opened the Formatting tab. We selected Data labels and
turned them on.

MANUPLATING DATA
An important part in preparing data for business intelligence is manipulating the data into usable standard
formats. In PowerBI, data can be manipulated both as it’s being brought into your report as well as after
you’re bringing the data into Power BI. Let’s take a look at some of these common data manipulations that
are built in PowerBI.

PREPARATION
1. Here is the sample data set we will use to explore some basic data manipulations.

2. From PowerBI Desktop, click on the “Get Data” button on the Home tab. Then select ‘Excel’ and select
your file.(Sample superstore)

33
3. Click on the checkbox next to the sheet containing the data. The “Transform data” button gives you a
chance to manipulate your data prior to importing.

4. Detecting Data Types

Click on the “OrderID” column header to select that column. Notice that the Data Type has not been
determined. Click on the “Detect Data Type” button.
34
5. Changing a Column’s Data Type
If you click on the “Data Type” button, you can change the data type of the column.

6. Replacing Data Values


Highlight the “Shipping mode” column and click on the “Replace Values” button.

35
7. Fill the Replace vales Columns and click ok

8.Notice the values have been changed

Output:

36
9.Extracting

Extract order years from order id

Highlight Order ID In transform Click on “Extract”button select text between Delimiters

10.Enter the Delimiters

37
11. Notice that OrderID column Changed in to Years and change the column name
Output:

12. Formatting Columns


Change the subcategory column into Uppercase
Select subcategory column

12.Rightclick Tranform Select Uppercase

38
13.Notice that Column changed to “Uppercase”
Output:

14.Change Customer name into Lower case and Capitalize each word
Highlight Customer name Column

39
15.Right click transform select lowercase and then capitalize each word

16.Notice that column has changed

40
Output:

17.Standard calculations
Adding to Quantity
Highlight Quantity column

18.Transform Select Standard and Add

41
19. Enter the value to add

20.Notice the value changes

42
Output:

43
EXPERIMENT-6
Aim:
Structuring your data, Sorting and filtering powerBI data, Pivoting PowerBI data
Solution:
Sorting data
1. Load sales2.csv into powerBI
2. From SKU COLUMN sort SKU id
3. Select SKU column Split by column /select byNon-digit to digit.

4. Notice the Column has sorted


Output:

44
EXPERIMENT-7
Aim:
AdvancedVisualizationTools: UsingFilters,Using the Detail panel, using the Size panels,
customizing filters, Using and Customizing tool tips, Formatting your data with colors
Solution:

Add a filter to a visual

Visuals have two different kinds of filters. The fields that are in a visual are automatically filters for that
visual. As the report designer, you can identify a field that isn't already the visual, and add that field directly
to the Visual level filters bucket.

1. In Power BI Desktop, select the Report icon.

2. Open the Visualizations, Filters, and Fields panes, if they're not already open

45
3. Select a visual to make it active. In this case, it's the scatter chart on the Overview page. All the fields in
the visual are in the Visualizations pane. They're also listed in the Filters pane, under the Filters on this
visual heading.

4. From the Fields pane, select the field you want to add as a new visual-level filter, and drag it into
the Filters on this visual area. In this example, we drag Category to Add data fields here.

46
5. Notice Category is not added to the visualization itself.

6. Select Kids. The scatter chart is filtered, but the other visuals stay the same.

7. If you save your report with this filter, report readers can interact with the Category filter in Reading
view, selecting or clearing values.

If you drag a numeric column to the filter pane to create a visual-level filter, the filter is applied to
the underlying rows of data.

Using the Size panels


1. Load data (Ranks data) into PowerBI
2. Create visualization
3. In format Visuals use size panel

47
Formating Your data with colors

Let’s walk through the steps necessary to customize colors on a visualization.

1. Select a visualization to make it active.


2. Select the paint brush icon to open the Formatting tab. The Formatting tab displays all the formatting
elements available for the selected visual.

48
3. Select Colors to expand its available customizations.

4.Change Show all to On, and select different colors for columns, rows, lines -- depending on the visual
type.

5. Notice that Bar colors has changed

49
Output:

Applying a style to a table

Some Power BI visualizations have a Style option. One click applies a full set of formatting options to your
visualization, all at once.

1. Select a table or matrix to make it active.


2. Open the Formatting tab and select Style presets.

50
3. Select a style from the dropdown.

Output:

4. Even after you apply a Style, you can continue formatting properties, including color, for that
visualization.

51
EXPERIMENT-8
Aim:

Creating Dash boards & amp; Storytelling, creating your first dash board and Story,
Design for different displays, adding interactivity to your Dash board, Distributing &
amp; Publishing your Visualization.

Solution:

Creating Dashboards
Create a dashboard for restaurant
1.Load Tips data into PowerBI

2. Download any restaurant image from goggle and load it in powerbi

52
3.Find number of males
No.of Males = COUNTROWS(FILTER(tips,tips[sex]="Male"))

4.Find number of Females


No.of Females = COUNTROWS(FILTER(tips,tips[sex]="Female"))
5.Calculate total bill
sum of Total_Bill = SUM(tips[total_bill])

5.Compute male smokers


Male smokers = COUNTROWS(FILTER(tips,tips[sex]="Male"&&tips[smoker]="yes"))

53
6.Compute Female smokers
Female smokers = COUNTROWS(FILTER(tips,tips[sex]="Female"&&tips[smoker]="yes"))
Male Smokers Total tip

8. Compute Male smokers tip


Male_Total_Bill = CALCULATE(SUM(tips[total_bill]),tips[sex]="Male")

9.Compute Female total bill


Female_Total_Bill = CALCULATE(SUM(tips[total_bill]),tips[sex]="Female")

11.Select Graph and Colour them


Output:

54
EXPERIMENT-9
Aim:

PowerBI file types, publishing to PowerBI Online,Sharing your visualizations, printing,


and Exporting.

Solution:

PowerBI file types,

1.In Power BI, you can connect to or import data and reports from these types of files:

 Microsoft Excel .xlsx and .xlsm files


 Power BI Desktop .pbix report files
 Comma-separated value (CSV) .csv files

What it means to get data from a file

In Power BI, the data you explore comes from a dataset. To have a dataset, you need some data.

To better understand the importance of datasets and how to get data for them, consider an automobile.
Sitting in your car and looking at the dashboard is like sitting in front of your computer looking at a
dashboard in Power BI. The dashboard shows all the things your car is doing, like how fast the engine is
revving, the temperature, what gear you’re in, and your speed.

In Power BI, a dataset is like the engine in your car. The dataset provides the data, metrics, and information
that's displayed in your Power BI dashboard. Your engine, or dataset, needs fuel, and data is the fuel in
Power BI. Your car has a fuel tank that provides gas to the engine. Power BI also needs a fuel tank of data
you can feed your dataset. That fuel tank can be a Power BI Desktop file, Excel workbook file, or CSV file.

To take it one step further, a fuel tank in a car has to be filled with gas. The gas for a Power BI Desktop,
Excel, or CSV file is data from a data source that you put into the Excel, Power BI Desktop, or CSV file.
You can manually enter rows of data into an Excel workbook or CSV file, or you can connect to the external
data source to query and load data into your file. After you have a file that contains some data, you can get
the file into Power BI as a dataset.

Where to save your file

Where you save your file makes a difference.

 Local. If you save your workbook file to a drive on your computer or another location in your
organization, you can import your file into Power BI. Your file remains on the source drive. When you
import the file, Power BI creates a new dataset in your site and loads your data, and in some cases
your data model, into the dataset. Any reports in your file appear in My workspace as Reports.

55
 OneDrive for work or school. If you have OneDrive for work or school, sign in with the same
account that you use for Power BI. This method is the most effective way to keep your work in Excel,
Power BI Desktop, or CSV files in sync with your Power BI dataset, reports, and dashboards. Both
Power BI and OneDrive are in the cloud, and Power BI connects to your file on OneDrive about once
an hour. If Power BI finds any changes, it automatically updates your Power BI dataset, reports, and
dashboards.

Note

You can't upload files from personal OneDrive accounts, but you can upload files from your computer.

 SharePoint team site. Saving your Power BI Desktop files to a SharePoint team site is much like
saving to OneDrive for work or school. The biggest difference is how you connect to the file from
Power BI. You can specify a URL or connect to the root folder.

Publish datasets and reports from Power BI Desktop

When you publish a Power BI Desktop file to the Power BI service, you publish the data in the model to
your Power BI workspace. The same is true for any reports you created in Report view. You’ll see a new
dataset with the same name and any reports in your Workspace navigator.

Publishing from Power BI Desktop has the same effect as using Get Data in Power BI to connect to and
upload a Power BI Desktop file.

To publish a Power BI Desktop dataset and reports


1. In Power BI Desktop, choose File > Publish > Publish to Power BI or select Publish on
the Home ribbon.

2.Sign in to Power BI if you aren't already signed in.

3.Select the destination. You can search your list of available workspaces to find the workspace into which
you want to publish. The search box lets you filter your workspaces. Select the workspace, and then click
the Select button to publish.

56
4. When publishing is complete, you receive a link to your report. Select the link to open the report in your
Power BI site.

Share Power BI reports

Sharing is the easiest way to give people access to your reports and dashboards in the Power BI service. You
can share with people inside or outside your organization.

When you share a report or dashboard, the people you share it with can view it and interact with it, but can't
edit it. The recipients see the same data that you see in the reports and dashboards. They also get access to
the entire underlying dataset, unless row-level security (RLS) is applied to it. The coworkers you share with
can reshare with their coworkers if you allow them to. 57
Some users are unable to share their reports and dashboards with others because they don't have the
necessary license or subscription. They can, however, receive reports and dashboards shared by colleagues

The Power BI service offers other ways to collaborate and distribute reports and dashboards, too.
Read Ways to collaborate and share in Power BI to see which way works best for your circumstances.

Prerequisites
 You need a Power BI Pro or Premium Per User (PPU) license, whether you share content inside or
outside your organization.
 Your recipients also need Power BI Pro or Premium Per User (PPU) licenses, unless the content is in
a Premium capacity.
 If you want to allow recipients to edit a shared report, you have to assign the user a workspace role
that allows editing. To learn more about role-level permissions and how to assign roles, read Roles in
workspaces.

Where you can share

 You can share reports and dashboards from My Workspace.


 You can share from workspaces other than My Workspace, if you have the Admin or Member role in
the workspace. If you have the Contributor or Viewer role, you can share if you have Reshare
permissions.
 You can share from the Power BI mobile apps.
 You can share from Power BI Desktop with OneDrive and SharePoint integration.
 to the Power BI service.
Print a report (Power BI Report Builder)

After you save a report to the Power BI service, you can view and print the report from a browser, the Power
BI service web portal, or any application that you use to view an exported report. Before saving a report, you
can print it when you preview it.

When you print a report, you can specify the size of the paper to use. The size of the paper determines the
number of pages in a report and which report data fits on each page. Paper size affects only reports that are
rendered with hard page-break renders: PDF, Image, and Print. Setting the paper size has no effect on other
renderers. For more information, see Rendering Behaviors (Power BI Report Builder).

From the report viewer toolbar in the Power BI service web portal or in preview in Power BI Report Builder,
you can export a report to a hard page-break renderer or select the Print button to print a copy of the report.
You might need to set the paper size or other page setup properties. Use the Report Properties dialog box
to change page setup properties, including paper size.
58
You can specify print page margins in two different locations: in design mode and in run mode.

 Design mode. When you set page margins in design mode, these settings are saved in the report
definition when you save the report.
 Run mode. When you set page margins in run mode, this information is not saved in the report
definition. The next time you print the report, you will get the settings from the report definition,
unless you indicate your print margins again.

Print a report in Power BI Report Builder

1. Open a report.
2. On the Home tab, select Run.
3. (optional) Select Print Layout to see how the report will look when it is printed.
4. (optional) Select Page Setup to set paper, orientation, and margins
5. Select Print.
6. In the Print dialog box, select a printer and specify other printing options.

Print a report from a Web browser application

1. In the Power BI service web portal, navigate to the report that you want to print. Open the report.
2. On the toolbar at the top of the report, select Print.
3. In the Print dialog box, select a printer, and then select Print.

Print a report from other applications

1. In the Power BI service web portal, navigate to the report that you want to print. Open the report.
2. On the toolbar at the top of the report, select a rendering format, then select Export. The report opens
in a viewer application that corresponds to the rendering format.For example, if you select PDF, the
report opens in Adobe Acrobat Reader.
3. On the File menu in that program, select Print.

59
EXPERIMENT-10
Aim:

Creating custom charts, cyclical data and circular area charts, Dual Axis charts.
Dual Axis charts.
Solution:

In Power BI, a Dual Axis chart is a single visualization that combines a line chart and a column chart.
Combining the two charts into one lets you make a quicker comparison of the data.

Dual Axis charts can have one or two Y axes.

When to use a Dual Axis chart

Dual Axis charts are a great choice:

 When you have a line chart and a column chart with the same X axis.
 To compare multiple measures with different value ranges.
 To illustrate the correlation between two measures in one visualization.
 To check whether one measure meets the target defined by another measure
 To conserve canvas space.

How to create a Dual Axis chart


To follow along below, use the Retail Analysis sample PBIX file.

1. From the upper left section of the menu bar, select File > Open report.
2. Find your copy of the Retail Analysis Sample PBIX file.
3. Open the Retail Analysis Sample PBIX file in report view .
4. Select to add a new page.

Create a basic single-axis combo chart

1. Start on a blank report page and create a column chart that displays this year's sales and gross margin
by month.

a. From the Fields pane, select Sales > This Year Sales > Value.

b. Select Sales > Gross Margin This Year and drag it to the Y-axis well.

c. Select Time > FiscalMonth and drag it to the X-axis well.


60
2.The visualization will be similar to this one.

3.In the upper-right corner of the visual, select the More options ellipsis (...) and select Sort
axis > FiscalMonth.

61
4.Select the ellipsis again and choose Sort axis > Sort ascending.

5.Convert the column chart to a combo chart. There are two combo charts available: Line and stacked
column and Line and clustered column. With the column chart selected, from the Visualizations pane
select the Line and clustered column chart.

6. From the Fields pane, drag Sales > Last Year Sales to the Line y-axis bucket.

62
7.Your Dual Axis chart should look something like this:

Create a combo chart with two axes

In this task, we'll compare gross margin and sales.

1. Create a new line chart that tracks Gross Margin Last Year % by FiscalMonth.
2. Select the ellipsis to sort it by FiscalMonth, then select the ellipsis again and choose Sort axis > Sort
ascending.
3. In January GM% was 35%, peaked at 45% in April, dropped in July and peaked again in August. Will
we see a similar pattern in sales last year and this year?
63
4. Add This Year Sales > Value and Last Year Sales to the line chart. The scale of Gross Margin Last
Year % is much smaller than the scale of Sales which makes it difficult to compare.

5. To make the visual easier to read and interpret, convert the line chart to a Line and stacked column
chart.

64
6. Drag Gross Margin Last Year % from Column y-axis into Line y-axis.

7. Power BI creates two axes, thus allowing the datasets to be scaled differently; the left measures sales
dollars and the right measures percentage. And we see the answer to our question: yes, we do see a
similar pattern.

65
Output:

Add titles to the axes

1. Select the paintbrush icon to open the Formatting pane.


2. Set Y-axis to On, then select the down arrow to expand the Y-axis options.
3. Set Y-axis > Values > Display units to Millions.
4. Set Y-axis > Title to On, then set Style to Show title only

66
5. Set Secondary y-axis to On to display options for formatting the line chart portion of the combo
chart.

6. Under Secondary y-axis, set Title to On.

Your combo chart now displays dual axes, both with titles.

7. Optionally, modify the text font, size, and color and set other formatting options to improve the
display and readability of the chart.

67
REFERENCEBOOKS:
a. MicrosoftPowerBIcookbook,BrettPowell,2ndedition.
b. TheArtofRProgrammingbyNormanMatloffCengageLearningIndia.

68

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy