Vinay Power Bi 05-03-21
Vinay Power Bi 05-03-21
Vinay Power Bi 05-03-21
Trainings:
CLASS ROOM
VIDEOS ONLINE
PROVIDED
FAST TRACK
ONE ON ONE
PROJECT TRAINING
Address:
Flat No: 506/B
Nilgiri Block
Aditya Enclave
Mytrivanam Area
Power BI Definitions, Power BI Components
Hyderabad.
PBI Installation Location and Process
Power BI Accounts Information Website & Blog
www.vinaytechhouse.com
Power BI Desktop Over View
www.msbivinay.blogspot.in
Import, Direct Query and Connect Live explanation
FAQS Contact Information
+91 9573168449
040 66638869
WE’VE WORKED WITH A DIVERSE CUSTOMER BASE. HOW CAN WE HELP YOU?
DEMO CONCLUSION
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 2
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 3
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 4
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 5
SEMANTIC LAYER:
Converts normal data into decision making data.
There are two types of decision conversion
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 6
REPORTING LAYER:
Represents the data with visuals [Chart, Matrix, Table, KPIs, Gauges etc...]
Tools:
SSRS, Power BI, Cognos, SAP BO, Microstrategy, OBIEE, SAS, Tableau, Qlik View etc...
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 7
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 8
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 9
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 10
b) Power BI Service: Cloud Service for managing reports and dashboards, and providing
schedules.
f) Power Pivot: Data Load, Transform, Model and Data Presentation. [Chart, Table]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 11
h)Power BI Desktop for Report Server : Specially designed to create report server reports.
Power Query
Power Query is a data connection technology that enables you to discover, connect, combine, and
refine data sources to meet your analysis needs. Features in Power Query are available in Excel and
Power BI Desktop.
Power Pivot
Power Pivot is a data modeling technology that lets you create data models, establish relationships, and
create calculations. With Power Pivot you can work with large data sets, build extensive relationships,
and create complex (or simple) calculations, all in a high-performance environment, and all within the
familiar experience of Excel.
Power View
Power View is a data visualization technology that lets you create interactive charts, graphs, maps, and other
visuals that bring your data to life. Power View is available in Excel, in SharePoint, SQL Server, and Power BI.
There are a few system requirements for Power View, based on which version of Excel, SharePoint, or SQL Server
you use. The visualizations in Power View are also available in Power BI and the Power BI Designer.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 12
Power Map
Power Map is a 3D data visualization tool for Excel that provides an immersive experience for making
discoveries in data that might never be seen in traditional 2D tables and charts. Power Map lets you
plot geographic and temporal data visually, analyze that data in 3D, and create cinematic tours to share
with others.
Other components
Microsoft PowerApps
PowerApps is an initiative by Microsoft that allows developers and nontechnical users to build mobile
applications from selectable templates. Using Microsoft Azure, the platform as a service offering, and built-on
development tools that target nontechnical users (this suite of tools was formerly known as Project Siena), users
can create, manage and share business apps on iOS, Android and Windows devices. Microsoft rolled out
PowerApps in late 2015.
The objective of PowerApps is to enable business users to build new capabilities via apps, without requiring that
they have code expertise. Microsoft touts an intuitive visual design for PowerApps, with drag-and-drop
functionality and a familiar look and feel taken from applications like PowerPoint.
PowerApps has connections to various Microsoft-based and third-party applications, including Microsoft SQL
Server, SharePoint and OneDrive in the Office 365 productivity suite, as well as Dropbox, Google Docs, SAP,
Oracle and Dynamics CRM.
Application programming interfaces to enable these data connections, as well as the apps themselves, are hosted
on Microsoft Azure.
Microsoft Flow
Microsoft Flow is cloud-based software that allows employees to create and automate workflows and
tasks across multiple applications and services without help from developers. Automated workflows are
called flows. To create a flow, the user specifies what action should take place when a specific event
occurs.
Microsoft Flow is a new workflow management tool for automating workflows across applications and
services by connecting web services, files, and cloud-based data. It empowers users to create workflows
to decrease time-consuming tasks or processes that automate approvals, send/receive notifications,
synchronize files, or collect, organize and update data.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 13
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 14
Csv/ Excel/
Data/ JSON/
XML
Relational
Databases
[SQL Server,
Oracle, Teradata]
Cubes
[Tabular,
Muldimensio
nal, SAP
cubes etc…]
Semi structured
Un structured and
other applications
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 15
1. Files
Database [SQL Server (more), Oracle, Teradata, MySQL Database, Amazon RedShift etc…]
Query based retrieval (select statement and get data)
View based (select statement inside view will get data)
Procedure based (select statement inside procedure will get data)
3. Cube Databases [Tabular /multi-dimensional]
SSAS Cubes [Tabular and Multidimensional] and SAP HANA
Analysis Services Cube retrieval
On-Premises
Cloud [Azure]
4.Data retrieval from Web Applications
5.Data retrieval through Python scripting
6.Data retrieval from other web applications through REST API protocols [Service now, Face
Book, Google Analytics, etc…]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 16
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 17
It is cloud based and charge according to the storage and users’ access.
My company using two P1 accounts, one P2 account and seven Pro accounts. [One Live project]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 18
Free Account
Premium Account [Capacity Pricing, more storage, more users and many reports]
It is of three types
a) Premium P1
b) Premium p2
c) Premium p3
Power BI Premium P1
8 v-cores:
4 Frontend Cores
4 Backend Cores / 25 GB RAM
It costs $5000/month USD per environment/node.
Power BI Premium P2
16 v-cores:
8 Frontend Cores
8 Backend Cores / 50 GB RAM
Power BI Premium P2 costs $10000/month USD per environment/node.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 19
Power BI Premium P3
32 v-cores:
16 Frontend Cores
16 Backend Cores / 100 GB RAM
==================================================================
The below is a screen shot from Admin Portal, shows 2 P1 accounts with 8 Core Systems
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 20
Pro Premium
With Power BI Pro, users are licensed With Power BI Premium, you are licensing
individually and participate fully in the use of capacity for your content rather than licensing
Power BI – both the creation of content and the
all users of that content. Content (datasets,
consumption. All Pro users can connect to
hundreds of data sources on-premises and in the dashboards, and reports) is stored in Premium
cloud, create interactive reports and 360-degree and can then be viewed by as many users as
dashboards, share that content with other Pro you want, without additional per-user costs.
users, and consume content shared by others. These users can only view content, not create it.
Viewing includes looking at dashboards and
reports on the web, in our mobile apps, or
embedded in your organization’s portals or
apps. The creators of content in Premium still
need their own Pro licenses.
For small and large deployments, Power BI
Pro works great to deliver full Power BI
capabilities to all users. Employees across
roles, departments, etc. can engage in ad
hoc analysis, dashboard sharing and report
publishing, collaboration and other related
activities.
Real-world case: Real-world case:
If an organization consists of 200 total users If the organization consists of 700 total users –
– 50 are engaging in self-service BI, while 100 are engaging in self-service BI, while the
the remaining 150 are limited to viewing BI remaining 600 occasionally view BI content –
content – Power BI Pro is the most the most economical deployment option would
economical deployment option for all users be to license Power BI Pro for the 100 users
within the organization. engaging in self-service BI and to license Power
BI Premium for the 600 seeking occasional
access to view BI content.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 21
Power BI Free
a)Power BI Free is included in all Office 365 Plans, and you can sign up for Power BI Free any
time you like.
b) This free version is surprisingly functional. It allows you to connect to hundreds of data
sources (no limit/restriction other than the amount of data you pull in), clean and prepare your
data, and build visualizations (no limit).
c) All of the types of visualization options in Power BI Pro are available in Power BI free.
Power BI Pro
a)Power BI Pro is an additional $9.99/user/month ($12.20 CAD). It is also included in Office 365
Enterprise E5.
It adds a bunch of new features:
a)On-Premise Data Gateways
If your data resides On-Premise (not somewhere in the cloud), you can now connect to this data
and analyze it. A common example of this is a self-hosted SQL database.
Power BI Premium
a)Power BI Premium is not a type of user license. Think of it as an upgrade to your entire
company’s capabilities.
b) Organizations with Power BI Premium have a super-powered server running their Power BI
environment; this allows them to surpass some limits. It is rather expensive ($5000-$20000/mo),
so only the largest companies will get use out of it.
Separate Resources
No more “noisy neighbours”. Power BI Premium gives you your own processing environment, so
your Power BI operations can’t be slowed down by other users that aren’t even within your
company.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 22
More Storage
Your company gets up to 100 TB of data storage to share in Power BI Premium.
Larger Datasets
Power BI Premium allows you to work with datasets up to 50 GB in size.
More
Having your own processing capacity allows for other cool features. Here’s a more in-depth
overview.
Conclusion
In conclusion: Power BI Free is quite functional, but there are limits on data refreshes, sharing,
and data storage that make Power BI Pro an attractive upgrade. Power BI Premium, on the other
hand, is a super-upgrade that your entire organization can use if you want to process very large
datasets.
Power BI Premium provides dedicated and enhanced resources to run the Power BI service for
your organization. For example:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 23
Project #1
Project #2
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 24
To download the most recent version of Power BI Desktop, you can select the download icon from the
upper right corner of the Power BI service, and select Power BI Desktop.
Regardless of which way you choose to download, once Power BI Desktop is downloaded, you're
prompted to run the installation file: Power BI Desktop is installed as an application, and runs on your
desktop.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 25
4. Your account will be created. It will ask you for more invites.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 26
By default, the email address you used to sign up to Power BI with is used to send you updates
about activity in Power BI.
1. Go to your Office 365 personal info page. If you are prompted to, sign in with the email
address and password you use for Power BI.
Note
If you do not see an Edit link, this means your email address is managed by your Office 365
administrator and you will need to contact them to update your email address.
3.In the Alternate email field, enter the email address you would like Power BI updates to be
sent to.
Note
Changing this setting will not affect what email address is used to send service updates,
newsletters, and other promotional communications. Those will always be sent to the email
address you originally used when registering for Power BI
When capturing an Active Azure Directory (AAD) embed token for Power BI, you can use three
different types of emails. The three different types are:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 27
1. If the mail attribute in the AAD tenant’s user object is present, then Power BI uses that
mail attribute for the email address
2. If the UPN email is not a *.onmicrosoft.com domain email address (the information after
the "@" symbol), then Power BI uses that mail attribute for the email address
3. If the “other” email array attribute in the AAD user object is present, then the first email
in that list (since there can be a list of emails in this attribute) will be used
4. If none of the above conditions are present, then the UPN address will be used
You can alternatively update the alternate email address via PowerShell for Azure Active
Directory. This is done with the Set-AzureADUser command.
Copy
Note
The feedback system for this content will be changing soon. Old comments will not be carried
over. If content within a comment thread is important to you, please save a copy.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 28
How many Power BI Desktops available and what are the differences?
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 29
a) Cloud Desktop
b) On-Premises Desktop
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 30
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 31
b) Home Ribbon:
Data options [Get data, Data Sources etc...] and some other relevant information.
c) View Ribbon:
Viewing options
[Limited objects, Book Marks, Page view, Page Width, Phone View etc...]
d) Modeling Ribbon: Model data elements [New Measure, Column, Table etc...]
Power BI Dataset:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 32
1. Visualizations Pane
2. Fields Pane
Power BI Dataset and Fields [Query Fields, New columns, New Measures, Hierarchies, Groups
etc...]
e) Desktop down you will find Pages, you can take multiple pages.
3.Filters Pane :
Visualization Pane:
1. It has many visualizations and allows you for custom visualization adding.
2. You can use R-Script / Python to construct own visual for statistical analysis.
3. Major types of visuals are
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 33
Charts [Stacked Column, Bar, 100% Stacked column & bar, Clustered
Column and Bar]
Line chart
Mixed Charts [Line and Clustered Chart]
Tree Map
Custom visual
Market Place
A Custom file
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 34
a)Fields arrangement
Format Section:
a) General
b) Position (X, Y etc...)
c) Colors
c) Font
d) Background color
e) Borders
f) Lock Aspect
g) Tooltip
h) Visual Header
a) Visual filter: Respective visual filtered based on condition [Basic condition and advanced
condition]
b) Page Filter: All visuals in the page are filtered based on condition
c) Report Filter: All pages in the report are filtered
d) Drill through filter: Filter the data in another page based on action in one page
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 35
Filters Pane:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 36
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 37
Differences between Load, Import, Direct Query Mode, and Connect Live?
What is mode?
The way you connect to application and get data is called as mode.
1) Import mode:
a) The selected tables and columns are imported into Power BI Desktop.
b) As you create or interact with a visualization, Power BI Desktop uses the imported data.
c) You must refresh the data, which imports the full data set again, to see any changes that
occurred to the underlying data since the initial import or the most recent refresh.
d) Import possible for most of the sources
e) Import available for analysis services tabular model.
Note: Simply Direct Data Load, Modelling and Reporting of data possible. More than 1 GB data
it will not allow/ decrease performance. Not more than 8 refreshments in pro and 48
refreshments in premium.
2)DirectQuery
a) No data is imported or copied into Power BI Desktop. For relational sources, the selected
tables and columns appear in the Fields list. For multi-dimensional sources like SAP Business
Warehouse, the dimensions and measures of the selected cube appear in the Fields list.
b) As you create or interact with visualization, Power BI Desktop queries the underlying data
source, which means you’re always viewing current data.
c) Many data modeling and data transformations are available when using DirectQuery, though
with some limitations.
d) When creating or interacting with a visualization, the underlying source must be queried and
the time necessary to refresh the visualization is dependent on the performance of the
underlying data source. When the data necessary to service the request has recently been
requested, Power BI Desktop uses recent data to reduce the time required to display the
visualization. Selecting Refresh from the Home ribbon will ensure all visualizations are refreshed
with current data.
d) Direct Query possible for few sources
e) Direct query not available for analysis services tabular model, rather Connect Live available.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 38
c) Connect Live
This is available for Analysis Services and works like Direct Query.
Only Structure
Refresh
Gateway
User Calls the report-→ Hits the actual database and Gets the data.
When you are working with more volumes of data, this is recommended.
User Calls the report-→ Hits the actual cube database and gets the data.
User Calls the report-→ Hits the Power BI Dataset [in-memory] and gets the data.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 39
• Amazon Redshift
• Azure HDInsight Spark (Beta)
• Azure SQL Database
• Azure SQL Data Warehouse
• Google BigQuery (Beta)
• IBM Netezza (Beta)
• Impala (version 2.x)
• Oracle Database (version 12 and above)
• SAP Business Warehouse Application Server
• SAP Business Warehouse Message Server (Beta)
• SAP HANA
• Snowflake
• Spark (Beta) (version 0.9 and above)
• SQL Server
• Teradata Database
• Vertica (Beta)
• DirectQuery lets you build visualizations over very large datasets, where it otherwise
would be unfeasible to first import all of the data with pre-aggregation
• Underlying data changes can require a refresh of data, and for some reports, the need to
display current data can require large data transfers, making re-importing data unfeasible.
By contrast, DirectQuery reports always use current data
• The 1 GB dataset limitation does not apply to DirectQuery
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 40
Ex: You can’t apply year /month/ day calculations on year, month and day columns. Means
For example, you can aggregate 10 million rows with your query that runs on the data source,
and accurately return the results of that aggregation to Power BI using DirectQuery as long as
the data returned to Power BI is less than 1 million rows. If more than 1 million rows would be
returned from DirectQuery, Power BI returns an error.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 41
Q: What are the options not visible when we work with Direct Query and Connect Live?
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 42
FAQS
You can create report in Power BI Desktop, you can publish, but you can not manage
reports.
a) Premium : p1
TBs data store, 8 Core System, 25 GB RAM, Multi user support, $5000 / month
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 43
b) Premium : p2
TBs data store, 16 Core System, 50 GB RAM, Multi user support, $10000 / month
c) Premium : p3
TBs data store, 32 Core System, 100 GB RAM, Multi user support, $20000 / month
What is mode?
The way you connect to application and get data is called as mode.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 44
a) Cloud Desktop
b) On-Premises Desktop
https://docs.microsoft.com/en-us/power-bi/report-server/install-powerbi-desktop
What is Refresh?
Once data imported from sources to Power BI, refresh mechanism is required to take source
data changes into Power BI.
There are two types of refresh and we do in two ways
a) Full refresh [ complete source data refresh]
b) Incremental Refresh [ only recently added data refresh / required data refresh]
b) Scheduled refresh
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 45
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
IT Real-Time training that work for your career.
PROVIDED TRAINING FOR THOUSANDS OF STUDENTS .
SUBJECT, MATERIAL & VIDEOS
Trainings:
CLASS ROOM
VIDEOS ONLINE
PROVIDED
FAST TRACK
ONE ON ONE
PROJECT TRAINING
Address:
Flat No: 506/B
Nilgiri Block
Aditya Enclave
Business Process, Conceptual, Logical, Physical Model Mytrivanam Area
Entity, Relationship, Attribute, and Tuple Hyderabad.
Relationships [1:1, 1:Many, Many: Many]
Models [Normalized model and Dimensional Model] Website & Blog
Dimension Table and Types, Fact Table and Types www.vinaytechhouse.com
Star, Snow flake, Galaxy, and Mixed (hybrid)schema www.msbivinay.blogspot.in
Active and Inactive relationships
Single and Bidirectional Relationships Contact Information
+91 9573168449
040 66638869
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 2
Terminology: Terminology:
Entity, Relationship, table, primary key, Dimension, Fact, surrogate key, composite
key, role playing, etc.
Foreign key etc.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 3
A general understanding to the three data models is that business analyst uses a conceptual
and logical model to model the business objects exist in the system, while database designer
or database engineer elaborates the conceptual and logical ER model to produce the physical
model that presents the physical database structure ready for database creation. The table
below shows the difference between the three data models.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 4
data model but they are just shown as a relationship with no cardinality under the conceptual
data model.
Conceptual data model example
NOTE: Conceptual ERD supports the use of generalization in modeling the 'a kind of'
relationship between two entities, for instance, Triangle, is a kind of Shape. The usage is like
generalization in UML. Notice that only conceptual ERD supports generalization.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 5
Physical ERD represents the actual design blueprint of a relational database. A physical data
model elaborates on the logical data model by assigning each column with type, length,
nullable, etc. Since a physical ERD represents how data should be structured and related in a
specific DBMS it is important to consider the convention and restriction of the actual database
system in which the database will be created. Make sure the column types are supported by the
DBMS and reserved words are not used in naming entities and columns.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 6
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 7
OLTP Terminology:
Attribute: Column
Foreign Key: One place it is unique and another place is it normal, then it is foreign key
Dimension: Textual attribute. [Does not support aggregations {sum, avg, min, etc.]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 8
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 9
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 10
Registration Form
Enrollment No:1001
OLTP DWH
Name: Kiran
Address: Road-3,Hyd
[Student table] [DimStudent]
Phone No:9573168449
Courses Looking for:…
Fee Receipt
OLTP DWH
Enrollment No:1001
Course Fee:7000 [FactPayments]
[Payment]
Couse name: Power BI ID:1001
Fee:7000
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 11
If we maintain textual and numerical data in a single table, the below are drawbacks
c) Retrieval slow
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 12
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 13
For example, package size is not directly related to product brand; nevertheless, package size
and product brand could both be attributes of the product dimension table.
Not normalized
The attributes in a dimension table are used over and over again in queries. An attribute is
taken as a constraint in a query and applied directly to the metrics in the fact table.
For efficient query performance, it is best if the query picks up an attribute from the dimension
table and goes directly to the fact table and not through other intermediary tables. If you
normalize the dimension table, you will be creating such intermediary tables and that will not
be efficient. Therefore, a dimension table is flattened out, not normalized.
Drilling down, rolling up
The attributes in a dimension table provide the ability to get to the details from higher levels
of aggregation to lower levels of details.
For example, the three attributes zip, city, and state form a hierarchy. You may get the total
sales by state, then drill down to total sales by city, and then by zip. Going the other way, you
may first get the totals by zip, and then roll up to totals by city and state.
Multiple hierarchies
In the example of the customer dimension, there is a single hierarchy going up from individual
customer to zip, city, and state. But dimension tables often provide for multiple hierarchies, so
that drilling down may be performed along any of the multiple hierarchies.
Fewer number of records. A dimension table typically has fewer number of records or rows
than the fact table. A product dimension table for an automaker may have just 500 rows. On
the other hand, the fact table may contain millions of rows.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 14
DEFINITION:
Fact is measurable attribute. Set of measurable attributes table is Fact table /Measure
Group Table. Many - many relationships providing table.
It contains two sections
a) Foreign key section b) Measures section
FEATURES:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 15
Sparse Data
It is important to realize this type of sparse data and understand that the fact table could
have gaps.
Degenerate Dimensions
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 16
1) Master table / Dimension table Vs. Child table / Fact table / Transaction table
Master table / Dimension table Child / transaction / Fact table
Contains primary key Contains foreign key
Hold Textual values More measurable values
No measurable information and does not Aggregate and analytical columns more
support for aggregate storage
More columns Less columns
Maintain less rows More rows
Support Hierarchies creation No support
[Country→State→City]
Drill down or drill up analysis possible Not supported
Answer for what, where, when etc… textual How much, how many etc… numerical
questions questions.
Ex: What is the location details for the What is the growth rate from previous year
locationid ‘HYD’ to current year?
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 17
TYPES OF DIMENSIONS
Types of dimensions
Various types of dimensions available.
Conformed dimension
Sharable dimension, where the dimension is used by the multiple fact tables.
Ex: Time, Location etc… tables can be shared, so we call them as confirmed dimensions.
Degenerated dimension
If a dimension has multiple foreign keys in the fact table, then it is role playing dimension.
Ex: If DimDate table has Enquiry_Date, Join_Date, CourseStart_Date keys in the fact tanle, then
the Date table is Role playing dimension table.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 18
Dirty dimension
If a dimension table has multiple non key values for the same business key and difficult
to identify business operation uniquely, then it is dirty dimension.
Ex:
ID,NAME,LOC
1,VINAY,HYD
1,VINAY,MUM
1,VINAY,CHE
Junk Dimension
If a dimension has non business data and that is used to store status / indicator / flags, or
any other kind of information, then it is Junk dimension.
Ex:
Country and Currency code table→Junk table
Gender information table—>Junk table
Status or flag table→ On/ Off, Current / Expired etc…
A dimension attribute that changes frequently is a rapidly changing attribute. If you don’t need
to track the changes, the rapidly changing attribute is no problem, but if you do need to track
the changes, using a standard slowly changing dimension technique can result in a huge
inflation of the size of the dimension. One solution is to move the attribute to its own
dimension, with a separate foreign key in the fact table. This new dimension is called a rapidly
changing dimension.
Attributes of a dimension that would undergo changes over time. It depends on the business
requirement whether particular attribute history of changes should be preserved in the data
warehouse. This is called a slowly changing attribute and a dimension containing such an
attribute is called a slowly changing dimension.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 19
Inferred Dimensions
While loading fact records, a dimension record may not yet be ready. One solution is to
generate a surrogate key with null for all the other attributes. This should technically be called
an inferred member, but is often called an inferred dimension.
Shrunken Dimensions
A shrunken dimension is a subset of another dimension. For example, the orders fact table may
include a foreign key for product, but the target fact table may include a foreign key only for
productcategory, which is in the product table, but much less granular. Creating a smaller
dimension table, with productcategory as its primary key, is one way of dealing with this
situation of heterogeneous grain. If the product dimension is snowflaked, there is probably
already a separate table for productcategory, which can serve as the shrunken dimension.
Static Dimensions
Static dimensions are not extracted from the original data source, but are created within the
context of the data warehouse. A static dimension can be loaded manually — for example with
status codes — or it can be generated by a procedure, such as a date or time dimension.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 20
Tip: Usually SUM, AVG, COUNT etc. come under fully additive measure
Tip: Usually TOP, BOTTOM, FIRST, LAST etc. come under semi additive measure
Because of few values participated.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 21
Tip: Usually Growth, Growth Percentage etc. come under Non additive measure
Because existing measures we are using to perform calculation.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 22
Additive
Additive facts are facts that can be summed up through all of the dimensions in the fact table.
Eg: Sales fact
Semi-Additive
Semi-additive facts are facts that can be summed up for some of the dimensions in the fact
table, but not the others.
Eg: Daily balances fact can be summed up through the customers dimension but not through
the time dimension.
Non-Additive
Non-additive facts are facts that cannot be summed up for any of the dimensions present in the
fact table.
Eg: Facts which have percentages, Ratios calculated.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 23
Snapshot
This type of fact table describes the state of things in a particular instance of time, and usually
includes more semi-additive and non-additive facts. The second example presented here is a
snapshot fact table.
Eg: Daily balances fact can be summed up through the customers dimension but not through
the time dimension.
Cumulative
This type of fact table describes what has happened over a period of time. For example, this fact
table may describe the total sales by product by store by day. The facts for this type of fact
tables are mostly additive facts. The first example presented here is a cumulative fact table.
Eg: Sales fact
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 24
1. A surrogate key is a system generated (could be GUID, sequence, etc.) value with no
business meaning that is used to uniquely identify a record in a table.
2. The key itself could be made up of one or multiple columns.
3. Usually created at dimension table and placed in Fact table to recognize dimension data quickly
4. Using regular sequence generation mechanisms and custom algorithms we create them.
5. Surrogate key values are non-changeable.
The following diagram shows an example of a table with a surrogate key (AddressID column)
along with some sample data. Notice the key itself has no business meaning, it's just a
sequential integer.
A natural key is a column or set of columns that already exist in the table (e.g. they are
attributes of the entity within the data model) and uniquely identify a record in the table. Since
these columns are attributes of the entity they obviously have business meaning.
The following is an example of a table with a natural key (SSN column) along with some sample
data. Notice that the key for the data in this table has business meaning.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 25
For example, when moving data between test systems you don't have to worry about duplicate
keys since new key will be generated as data is inserted.
• If a sequence used then there is little index maintenance required since the value is ever
increasing which leads to less index fragmentation.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 26
For example, SQL Server identity columns are implemented a little bit different than they are in
Postgres or DB2.
Primary Key:
a) Database physical key
b) Unique values taking in a column
Surrogate Key:
a) Not a database key, we take in DWH and BI projects while working with
records to address them uniquely and properly
b) Already you have a primary key in the table, still you need uniqueness to
recognize records, then we go for surrogate key
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 27
Courses
Foreign Key
Also known as FK, a foreign key is a reference to a primary key in a table. It is used to
identify the relationships between entities. Note that foreign keys need not be unique.
Multiple records can share the same values.
Relationship
A relationship between two entities signifies that the two entities are associated with each
other somehow.
For example, a student might enroll in a course. The entity Student is therefore related to
Course, and a relationship is presented as a connector connecting between them.
Cardinality
Cardinality defines the possible number of occurrences in one entity which is associated
with the number of occurrences in another.
For example, one student can join multiple courses [I: Many].
Multiple cardinalities available (1:1, 1: Many, Many: Many).
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 28
Note:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 29
One-to-Many relationship
A one-to-many relationship refers to the relationship between two entities X and Y in which an
instance of X may be linked to many instances of Y, but an instance of Y is linked to only one
instance of X.
Note:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 30
Many-to-Many relationship
A many-to-many relationship refers to the relationship between two entities X and Y in which
X may be linked to many instances of Y and vice versa. The figure below shows an example of
a many-to-many relationship.
Note:
1. Many to Many cardinality, single and bidirectional are different.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 31
DimCourse to Fact having one to many relationships, If I would like to know how many unique
courses used in a year in the Fact table, you will get all courses count as a result however you
slice (year or location or any…)
In this situation Fact table evaluation happened based on dimension entries (Dimensions→Fact)
Best Question For Single Direction: Courses and the total discount fee values
Bidirectional relationship
Here Dimcourse to Fact relationship both the directions, so if you slice on any column
(Ex: year), then respective courses used in the fact table you will find.
In this situation DimCourse evaluation happened based on fact table entries (Fact→Dimensions)
Best Question for Both Direction: Number of Courses Out of Total Courses having
Business?
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 32
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 33
Here the Date table is role playing dimension table. At a time one column of Date table is active
(thick line) and remaining are inactive (dashed lines) and connected to Fact table. The column
which is active only participated in the analysis.
Example:
If OrderDate is active, order date analysis only possible.
In case you want to analyze DueDate or ShipDate, then make the OrderDate inactive and the
require column put active.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 34
Other images:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 35
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 36
Other Images:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 37
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 38
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 39
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 40
CUBE:
1.It is a multidimensional object which contains dimensions and facts and arranged in a schema
model (star / snow flake / mixed (star+ snow flake) / Galaxy schema).
2. Help us to work with multiple dimensions data and to create aggregations for quick analysis.
3. Cube cells hold measurable data and corner cells hold aggregate data
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 41
`
==========================================================
Our Database “Vinaytech_Dev_Business_Details” having multiple dimensions and one fact
table.
Ex:
Each Course should contain one ID
[One Student--> One Student Profile]
Ex:
One date can be used by many people in the business.
DimDate (Date:PK)----> FactPayments(Date: FK)
Foreign Key column [references]: It refers to the master table (another) primary key or unique
key values. It will not allow other than master table values.
FactPayment (LocID:FK)
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 42
FactPayments
FactPayment Columns
Many-Many:
Many courses can be handled by many students in many locations in different modes.
Always one bridge table (in the above picture FactPayments) is required to provide many-many
relationship between all these dimension tables.
Practical:
Getdata→ Specify Sqlserver Instance and Database name (VINAYTECH_BUSINESS_DETAILS)→
Import
Choose tables DimCourse, DimMode, DimLocation, DimStudent, DimDate, Users, DimInstitute
and FactPayment.
Load
Go to relationships view, observe the model, due to column names mismatch DimLocation and
Factpayments are not connected.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 43
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 44
b) It holds dimensions and facts. All dimensions having 1:Many relationship with Fact table.
1: Many--> Cardinality
Cardinality: The number of times it appears
c) It is in the Snow Flake Schema format, because Dimension tables having hierarchies
[ DimInstitute-->DimInstituteType]
d) Date table is Role Playing Dimension table, because it has three foreign keys in the Fact
table We have only one column as active and remaining as inactive.
e) Date table has surrogate key called DateKey along with Primary Key (Date)
Ex: Date Key : 20191223
Date: 2019-12-23
f) DimCourse has bidirectional relationship with FactPayments Table
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 45
FactPayments:
(Bridge table) which has Many:1 cardinality with all dimensions.
It also has measurable data for analysis.
Ex:
ActualFee
DiscountFee
TaxAmount
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 46
Get Data from the below places and generate a model as mentioned
[Heterogenous applications]
a) Get Csv file data [ DimStudent]
b) Get Text file data [DimCourse]
c) Get Excel data [ DimDate, DimLocation, DimCourseMode, DimInstitute, DimInstituteType]
d) Get Table data [FactPayements data from VINAYTECH_DEV_BUSINESS_DETAILS database]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
IT Real-Time training that work for your career.
PROVIDED TRAINING FOR THOUSANDS OF STUDENTS .
SUBJECT, MATERIAL & VIDEOS
Trainings:
CLASS ROOM
VIDEOS ONLINE
PROVIDED
FAST TRACK
ONE ON ONE
PROJECT TRAINING
Address:
Flat No: 506/B
Nilgiri Block
a)Power BI End-End steps Aditya Enclave
b)Working with Flat file and excel files Mytrivanam Area
c) Working with Databases [Using Query, View, and Procs] Hyderabad.
d)Working on Import and Direct Query Modes
e)Working with Analysis Services Cubes [Tabular ] Website & Blog
f) Working with JSON www.vinaytechhouse.com
g)Working with Lists (Blank Query) and Mashup www.msbivinay.blogspot.in
h)Working with Azure SQL Database [Cloud]
i)Dynamically creating table
Contact Information
+91 9573168449
Note: 040 66638869
This document is for queries creation from possible feeds
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 2
Scenario: Getting data from Flat file, Generate Report, and publish it.
Open Desktop
Get Data--> Text/ Csv--> Browse to file [Party_Src.csv]
File Origin: Country and Code page [Language charset]
Delimiter: Separator in the file data [comma, space, tab space, pipe etc...]
Data type Detection: First 200 rows [Default option]
System identifies the data type based on first 200 rows of the column values.
Ex:
Assume you have 1000 records, first 200 are textual data next 200 are dates and the other are
numeric.
It will take Textual data because of first 200 columns
Real-time usage: If we detect properly, you can apply calculations easily [Normal and DAX].
Go to Data view and see the accuracy of data, if it not good then go for Edit Queries to move
into Power Query Area [ETL Area where it load and operates in in memory using Vertipaq
engine]
Queries--> Rc--> Remove Top Rows (2) -->Step1 added in the right hand side
Rc--> Use First Row as Headers → Step2 added in the right hand side
Close and Apply
Goto Report view, take table and drag and drop fields [PARTYID, PARTYNAME, PARTYLOC and
PARTYINCOME] from field’s pane into Values section.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 3
Ensure aggregation unchecked (Sum or Avg or Count etc...) for PARTYID, PARTYNAME,
PARTYLOC AND PARTYINCOME.
PARTYID, PARTYNAME and PartlyLoc --.Don't summarize
Partyincome--Sum
Format Options [As you wish]
Home menu--> Publish
[Vinaytech_Business_Details_Dataset.xls]
Get Data--> Excel-->Browse to the file--> Tick mark the below dimension and fact tables
DimDate,DimCourse, DimCourseModeID, DimLocation, DimStudent and FactPayments
Always dataset require columns and values [No aggregate information or any], please apply
transformations to make that data as proper columnar data.
Observations:
We never maintain row level aggregate data, so remove those Sub values.
We never maintain date values column wise, so transpose / convert columns to rows [Unpivot]
Get data--> Excel--> Browse to Excel file (Budget.xls)--> Choose the Sheet--> Edit -->
Implement the below
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 4
1) Row Transformations
2) Column Transformations
Highlight first four columns --> right click--> Unpivot other columns, so that Month column
values converted into Row Values.
Now it will generate a list with the values between 2005 and 2025.
To convert to table, home ribbon →click TO Table icon and press ok.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 5
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 6
To work with Azure [SQL Database / SQL Warehouse / Analysis Services], know the below
entries.
a) Azure servername where it installed
b) Databasename
c) Credentials [ Azure active directory credentials or SQL Credentials]
In Power BI DESKTOP
Get data→ Azure SQL Database / SQL Server Database → Specify Server Name and Database→
OK→Choose tables →
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 7
Note: See the below to recognize the Azure Server and Database name.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 8
Click Table icon in the home menu at Power BI Desktop, enter the below rows, provide table
name and click Ok
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 9
WORKING ON DATABASES
a) Relational Database
b) Multidimensional Database
c) No SQL Databases
Relational Databases:
Cube Databases:
MSBI-SSAS [Multidimensional & Tabular], SAP Netviewer, SAP HANA, Hyperion Cubes etc.
NO SQL Database:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 10
It requires
a) SQL Server Database Engine Installation
b) SQL Server Management Studio [SSMS]
This studio is suitable to work with multiple databases [Normal, Cube, DQ, MDS etc.]
Note: Install the above by following the video and Installation Documents.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 11
--Create schema [logical object inside database to create groups for the
objects]
--Create a table
create table sc.emp(eid integer,enm varchar(20),did integer,jdate date)
/*
Views
*/
Syn:
Ex:
--Create view which shows dept 10 data
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 12
/*
Procedure
*/
Syn:
Create procedure <procedurename> (args IN/ Out)
as
Begin
Set of statements
End;
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 13
end;
--Calling procedure
Exec pr
--Calling procedure
Exec pr1 10
--Calling procedure
Declare @name varchar(30)
Exec pr2 1, @name out
print @name
/*
Functions
*/
Syn:
Create function <fname>
return <returntype)
(
return ...
)
Ex: --Creating function which will take value and return result
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 14
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 15
SELECT STATEMENT
Tables
[Data-All
Locations ]
Operations [Permanent /
Temporary] Procedure [many statements]
Result [optional]
Operations [Permanent /
Temporary] Functions [many statements]
Return result [compulsory]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 16
Import
Database Views:
a) Logical object / window to tables / virtual object
b) No data inside view, it has just one Select Statement Structure
c) When we call view (using simple select), it hits the database and execute the select statement
inside body and retrieves data.
Create like below in SSMS--> Vinaytech_Business_Details database
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 17
Scenario: Getting data from SQL Server Database and Generate Report from Views.
b) Second way:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 18
Database Procedures
a) Precompiled object with collection of statements, so at run time it will not compile
and directly participate in execution.
b) Procedures can implement multiple statements and perform an operation.
c) Procedures are recommended to make database changes isolated (independent)
to the Power Bi Report.
Ex: One table structure changed, if we use procedure in Power BI we need not get
those changes. Procedure will take care of it.
Differences between view,
procedure and function?
Create a procedure like below in SSMS
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 19
ON F.StudentID=DS.StudentID
INNER JOIN DimDate AS DT
ON F.Date=DT.Date
Where DT.Year=@Year
END;
Scenario: Getting data from SQL Server Database and Generate Report from Procedure.
Import
Advanced tab
Command timeout in minutes: 30 (After 30 minutes query execution aborted)
Note: While we are using Import Mode, You can't take sources of other modes
[Connect Live and Direct Query]
But you can add as many as possible and from heterogeneous applications to import
mode Dataset.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 20
1st Way:
2nd Way:
Get data->SQL Server->Import -> go to advanced specify timeout and write query-> Load
1st Way:
2nd Way:
Get data->SQL Server-> Direct Query-> go to advanced specify timeout and write query->
Load
1st Way: Get data->SQL Server Analysis Services-> Connect Live-> choose tables-> Load
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 21
2nd Way:
Get data->SQL Server Analysis Services-> Connect Live-> Go to advanced specify MDX query
for Multidimensional model/ DAX for Tabular model> Load
What are the things we need to collect when we work with cubes?
a) Multidimensional cube
1) Server name 2) Cube database name 3) Tables or MDX query
MDX—Multidimensional Expressions
b) Tabular cube
1) Server name 2) Cube database name 3) Tables or DAX query
DAX—Data Analysis Expressions
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 22
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 23
Q: What are the options not visible when we work with Direct Query and Connect Live?
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 24
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 25
Difference between Query Query contain multiple columns, whereas List contain single
and List? column.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI ALL DATA FEEDS PRACTICE [VIDEO ASSISTANCE REQUIRED] 26
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
IT Real-Time training that work for your career.
PROVIDED TRAINING FOR THOUSANDS OF STUDENTS .
SUBJECT, MATERIAL & VIDEOS
Trainings:
CLASS ROOM
VIDEOS ONLINE
PROVIDED
FAST TRACK
ONE ON ONE
PROJECT TRAINING
Address:
Flat No: 506/B
Nilgiri Block
Aditya Enclave
a) Power Query options [ Queries Properties, Query Mytrivanam Area
Properties, and Column Properties, Filter Hyderabad.
Properties]
b) Case Stdy-1 Website & Blog
www.vinaytechhouse.com
www.msbivinay.blogspot.in
Contact Information
+91 9573168449
040 66638869
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 2
Explanation:
a) Each script starts with " let"
b) Each script ends with " in" followed by last step / variable
c) One variable / step separated to other with "comma"
d) Each variable followed by previous variable.
Taking possible database steps and constructing a query is called query folding.
Useful to perform possible operations at database level (improves performance by running
faster) and remaining steps implementation at power query level.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 3
Reference take only source step from the copied or referenced object.
So, if the referencing object changes, referenced object get those changes.
Functions are reusable objects and used for doing set of operations.
We can call multiple times and implement the process all the times.
Usually functions return values.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 4
b) Individual Query Pane: Individual Query and Individual column properties [Middle]
c)Query settings pane: Working with operations implemented [Right hand side]
e) Menu ribbons [Home, View, PARAMETERS, Add Column, Transform, Help etc.]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 5
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 6
a) Working on Queries Properties [What are the properties queries section has?]
SCENARIO: Duplicate, Copy and Reference practice [Differences between duplicate and Reference?]
Duplicate create an isolated copy with all steps, so changes to the original does not affect here.
Reference create a dependent copy (you can see the query dependencies in Query
Dependencies menu item), so changes at original affect reference. You can’t drop original
without dropping referencing objects.
1. DimStudent query->RC-> Duplicate, rename DimStudent_dup
2. DimStudent Query→ RC→ Reference, DimStudent_ref
3. Convert StudentID to text, Transform Firstname to uppercase in DimStudent Query
4. Observe the Duplicate (no change) and Reference (the changes imposed here) Queries
5. DimStudent query->RC-> delete, it will not allow you because of referencing objects.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 7
SCENARIO: Enable and Include in Report Refresh [What is the impact of Enable and Include Refresh]?
SCENARIO: Create function and use it in queries [When do we create and use function?]
Create AnnualDiscountFee function and AnnualDiscount_Inc function and reuse multiple times
across queries.
Syntax: =(argument as datatype, argument as datatype)=>Body of function
1st Function creation
Queries area (left hand side)→ right click→ New Query→Blank Query→ Specify the below
expression.
= (DiscountFee as number)=> DiscountFee * 12
Rename Query as AnnulDiscountFee
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 8
Go to Factpayment query→ Click Invoke Custom Function under ADD column menu→
System now adds a new column in the FactPayments and shows AnnualDiscountFee.
Similarly invoke custom function AnnualDiscountFee_Inc.
System now adds a new column in the FactPayments and shows AnnualDiscountFee.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 9
Keep the specified start row to end row [to KEEP / REMOVE]
Click Add Custom Column, drag and drop the fields from right hand side queries and create
expression [real time: Additional business columns]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 10
Is there any way to implement custom column and conditional column operation?
Click Add Conditional Column, specify like below [Real-time: Additional business column]
Custom column throws result based on expression, whereas conditional column throws
result based on condition satisfied.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 11
SCENARIO: Add Index Columns to the Query [How do we add index columns and impact of it?]
Add index column: Add a new column to the query and specify values
From 0 → The newly added column has values starting from 0
From 1 → The newly added column has values starting from 1
Custom Index→ Takes a starting values (Ex: 20) and increment value(1)
1. Add Index column→ From 0
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 12
List Query
Single column of values Single or multiple columns
Does not bother about data types Displays data types and allow us to
change
No additional properties to operate We have many additional properties
[No removal of duplicates, keeping top rows
etc…]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 13
Scenario: Use the first 100 records available in the input query.
Scenario: Use the last 100 records available in the input query.
Scenario: Use the rows between 300 and 500 in the input query.
Scenario: Remove top 100 records in the input file and use it.
Scenario: Remove rows between 300 and 500 in the input file and use it.
Scenario: Remove bottom 100 records in the input file and use it.
Scenario: Remove 2nd record onwards three records and then keep 2 records
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 14
Remove duplicates
Scenario: Remove the error data in the ratio column and use it.
[ratio= sum(field)/count(field)]
Remove errors
Scenario: Keep the errors in the ratio column and use it for error analytical reporting.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 15
In Power BI, there are two topics to implement Set Theory and Joins
b) Merge: Joins
c)
Works like Set theory “Union ALL” Works like Joins in SQL
Row structure should match Condition column data type should match
Incase column names do not match; it will We have Inner, Outer and Anti Joins only
add as new columns
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 16
B) Merge same structured rows [ no of columns and order of data types matched]
D)If we specify un structured object, those columns added separately to the result [has
nulls for other fields]
Practice:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 17
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 18
SQL Joins
3. THE RELATIONSHIP ESTABLISHED TO GET COLS FROM OTHER TABLE IS CALLED JOIN TYPE.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 19
Left unmatched = Left join + Where clause right columns evaluated with NULL
Right Unmatched=Right Join +Where clause left columns evaluated with NULL
A) Follows Join Protocol [Column wise Operation and fetch required columns from other
object/ query]
4. Full join → Matched data based on condition + unmatched from left + unmatched from
right
[In SQL→ Left join + where clause right column values evaluated with NULL]
[In SQL→ Right join + where clause left column values evaluated with NULL]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 20
PARTY(PID)={1,2,3,4,5}
PARTY_ADD(PID)={2,3,6,7}
={2,3}
={2,3,1,4,5}
={2,3,6,7}
={2,3,1,4,5,6,7}
={1,4,5}
={6,7}
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 21
Inner join:
1. Location Query-> top right corner->Merge Queries-> highlight the LocD column in
Location Query
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 22
1. Location Query-> top right corner->Merge Queries-> highlight the LocD column in
Location Query
Additional Examples
1. EMP Query-> top right corner->Merge Queries-> highlight the DID column in EMP
Query
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 23
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 24
Similarity match
Use FactPayments CourseID matching with DimCourse table Course Name matching
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 25
There are three types of fields, and the properties slightly different from one to another
based on data type.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 26
Drilldown will construct a list from the existing (replaces query with list), whereas add as
new query will construct a new list.
Change Type Options Importance of data types used for calculatins
Refer to Data types topic [previous topic]
Transform [Numeric]
What are the round options available?
Differences between Round, Round Up, Round Down?
Real-time Observation:
Transform [Character]
Differences between Trim and Clean?
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 27
What are the additional options you will find when you work with Strings?
Split, Character Transforms
What are the additional options you will find when you work on Multiple Columns?
Merge
Note: It will create a list and we can find in the left hand side with list symbol
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 28
Go to edit queries→ select table→ click TO Table from ribbon→ specify delimiter (in case you
have to get multiple columns in the table, now it is NONE (No delimiter))
SCENARIO: Adding new custom column and splitting data
Source:
Add Column→ New Custom Column→ Column name: Course_Mode
Value: = [CourseID] & "," & [ModeID] & "," & "INDIA"
Take a copy of the Query
Remove other columns by keeping Course_Mode
Convert Course_Mode into LIST (RC-> Add New Query)
Click TO TABLE and Specify Delimiter (Comma)
CourseID-> Split-> based on – →to see the coursename and type separately
Use the previous scenario split columns, highlight both columns→Merge→Choose delimiter
[this time “space”]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 29
How many Remove duplicate or Error options available and how they are different?
Remove duplicates at Query level→ Row duplicates removed
Remove duplicates at column level→ Column cell value duplicates removed
SCENARIO: Grouping on Institute and finding Count of students, Sum and Average of
Discountfee
SCENARIO: Grouping on Institute and Mode, and finding Count of students, Sum and
Average of Discountfee
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 30
Have null values in the columns and specify Fill Up / Down so that the last value copied in the
null cells up and down
Note: Go to the appended data of Courses_New and Courses_Upcoming
CourseID→ Fill Down
Duration→ Dill Up
Note: Highlight the column→ right click
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 31
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 32
d)Filter properties
There are three major types of filter properties. These help to have required data in the query.
Parameters and other intermediaries filtered here.
a) Numeric filter properties
b) String filter properties
c) Date filter properties
Numeric Filters:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 33
Example: Keep only the actual fee values between 12000 and 14000
Number Filters→ Between
STRING FILTERS
Examples:
a)Get the students whose name starts with ‘v”
b)Get the students whose names do not contain ‘marry’
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 34
Date Filter:
Custom Filter:
In case the above filters not directly supporting your operation, to construct own formula, we go
for custom filtering.
Example: Display 2019 March 1 and 2019 March 19 data
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 35
Business Case:
Analyze Venture capital funding data for some of the popular companies and present insights
and observations from the data. Please understand that you have to make sense of the limited
data provided and call out any assumptions you make.
Data Provided:
Deliverables Expected:
Regards,
SRI VINAY TECH HOUSE.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
IT Real-Time training that work for your career.
PROVIDED TRAINING FOR THOUSANDS OF STUDENTS .
SUBJECT, MATERIAL & VIDEOS
Trainings:
CLASS ROOM
VIDEOS ONLINE
PROVIDED
FAST TRACK
ONE ON ONE
PROJECT TRAINING
Address:
Flat No: 506/B
Nilgiri Block
Aditya Enclave
Mytrivanam Area
QUERY FOLDING IN POWER BI Hyderabad.
NATIVE QUERY
POWER BI PARAMETERS [ANY, LIST, QUERY] Website & Blog
POWER BI POWER QUERY MASHUP LANGUAGE www.vinaytechhouse.com
www.msbivinay.blogspot.in
POWER BI REUSABILITY
POWER QUERY HOME RIBBON, VIEW RIBBON Contact Information
POWER QUERY VARIOUS TRANSFORMATIONS +91 9573168449
040 66638869
It folds the query, so that the SQL engine will take the process overhead and reduces burden at
Power BI mashup Engine level.
In other words, SQL processes always faster than Power BI Mash up process.
So, take as much as code possible in the source side and the remaining implement at PBI.
Example:
Out of 10 transforms 8 possible at SQL, then fold the steps and execute at source.
How do we implement?
f) Remove the FactPayments Query and GetData again, specify Sql Server Details,
Advanced option, write the above query [native query]
Note: If this query is not optimized, you can write your own query [SELECT QUERY] and pass it.
If you feel Procedure or View is better, use them.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 2
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 3
When we work with databases Power BI Generate query to implement operations at Database
side. The query which is generated by Power BI Power Query is called as Native Query.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 4
let
Function_Fullname = (Firstame_Par,Middlename_Par,Lastname_Par ) => (Firstame_Par &
Middlename_Par & Lastname_Par)
in
Function_Fullname
Note: Enter values and press invoke function, so that you would get FULLNAME
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 5
b) List Parameter
User provided with list of values [Static list of values]
In case of less values and static values this is helpful.
So, dropdown is taken to show the values.
c) Query Parameter
User provided values through a query.
Dynamic list of values, change at report level based on data set values change.
So, dropdown is taken to show the values.
SCENARIO: Parameter (Any) Implementation
1. Model-->Query editor-->Manage parameters-->new parameter (PARLOC)
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 6
Note:
3. Click advanced editor and change the static value to parameter name or ensure properly
mapped [PARTYLOC=PARLOC] .
PARTYLOC is column and PARLOC is parameter
4.Testing:
a)Go to report view, take table visual and specify some fileds [locationid is compulsary].
b)Home menu→Edit queries→Edit Parameters→specify parameter value→Click Apply changes,
you will now see the latest parameter passed value data.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 7
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 8
2. FactPayments query→ choose locationID and filter with PARLOC parameter and
Institute with PARINST parameter
3. Ensure advanced editor showing properly
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 9
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 10
Create two parameters like above one for server connection and another one for
Database name.
2. Get data-->Sqlserver→Server name-->parameter-->specify
Database name→Parameter→Specify→
Note: At Get data, no need to enter settings.
Real-time advantage:
2nd way:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 11
Template will allow you to create a copy and perform your operations {add sources, can change
dataset values or features etc…}, whereas Power BI dataset does not allow to do that.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 12
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 13
a) Heart of the Power query is the Power Query M formula language, a case-sensitive, data
mashup language available to Power BI Desktop, Power Query in Excel, and the Get &
Transform import feature in Excel 2016.
b) Power Query M language statements are made up of individual language elements such as
functions, variables, expressions, and primitive and structured values that together define
the logic necessary to shape the data.
Features:
a) Each query in Power BI Desktop is a single Power Query let expression that contains all
the code elements necessary to define a dataset.
A let expression is made up of a let statement and an in statement, as shown in the following
syntax:
let
<em>variable</em> = <em>expression</em> [,...]
in
<em>variable</em>
b) The let statement includes one or more procedural steps that define the query.
c) Each step is essentially a variable assignment that consists of a variable name and an
expression that provides the variable’s value.
d) The expression defines the logic for adding, removing, or transforming the data in a specific
way.
e) The variable can be of any supported Power Query type. Each variable within a let expression
must have a unique name, but Power Query is fairly flexible about what you call it. You can even
include spaces in the name, but you have to enclose it in double-quotes and precede it with a
hash tag, a somewhat cumbersome naming convention (and one I prefer to avoid).
f) The variable names are also the same names used to identify steps in the Applied
Steps section in Query Editor’s right pane, so use names that make sense.
g) You can include as many procedural steps in your let statement as necessary and practical. If
you include multiple steps, you must use commas to separate them. Each step generally builds
on the preceding one, using the variable from that step to define the logic in the new step.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 14
h) The accepted convention when writing a let statement is to keep the physical and logical
orders in sync.
i) The in statement returns a variable value that defines the dataset’s final shape. In most
cases, if not all, this will be the last variable defined in your let statement.
j) When you select a step, you are essentially viewing the contents of the associated variable.
1. Add a blank query to Power BI Desktop. Click Get Data on the Home ribbon in the main
window, navigate to the Other section, and double-click Blank Query.
2. Then, on the View menu, click Advanced Editor. The editor will open with a new let expression
defined, as shown in the following figure.
let
Source = ""
in
Source
The let statement includes a single procedural step in which the variable is named Source and
the expression is an empty string, as indicated by the double quotes. Notice that the variable is
also listed in the in statement and as a step in the Applied Steps section of the right pane
3.The first procedural step that you’ll add will retrieve the contents of the party.csv file and save
them to the GetParty variable. To add the procedure, replace the existing let expression with
the following expression:
let
GetParty = Csv.Document(File.Contents("C:\DATA\PARTY_SRC.csv"),[Delimiter=",",
Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None])
in GetParty
The expression uses the Csv.Document function to retrieve the file’s contents as a Table object.
The function supports several parameters, but only the first one is required to identify the
source data. As part of the first parameter, you must also use the File.Contents function to
return only the document’s data.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 15
The second parameter can be specified as a record that contains optional settings. In Power
Query, a record is a set of fields made up of name/value pairs enclosed in brackets. The record
in this example includes the Delimiter and Encoding options and their values.
The Delimiter option specifies a comma as the delimiter in the CSV document, and
the Encoding option specifies the text encoding type of 1252, which is based on the Windows
Western European code page.
After you’ve entered your code, click Done to close the Advanced Editor and run the procedural
step.
Notice that the first step in the Applied Steps section is named GetParty, the same as the variable
name. The procedural step’s expression is also displayed in the small window above the dataset.
You can edit the code directly in this window if necessary.
The expression uses the Table.PromoteHeaders function to promote the first row to the
column headers.
The second parameter, PromoteAllScalars, is optional, but is a good one to know about. By
default, Power Query promotes only text and number values. When
the PromoteAllScalars parameter is included and set to true, Power Query promotes all scalar
values in the first row to headers.
let
GetParty = Csv.Document(File.Contents("C:\DATA\PARTY_SRC.csv"),[Delimiter=",",
Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None]),
in
PartyHeader
= let
GetParty = Csv.Document(File.Contents("C:\DATA\PARTY_SRC.csv"),[Delimiter=",",
Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 16
in
#"Datatype change"
Use the Table.RenameColumns function to rename several columns. The function returns a
new Table object with the column names updated as specified.
let
GetParty = Csv.Document(File.Contents("C:\DATA\PARTY_SRC.csv"),[Delimiter=",",
in
#"Rename columns"
5. Filtering Rows
let
GetParty = Csv.Document(File.Contents("C:\DATA\PARTY_SRC.csv"),[Delimiter=",",
Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None]),
PartyHeader = Table.PromoteHeaders(GetParty, [PromoteAllScalars=true]),
#"Datatype change" = Table.TransformColumnTypes(PartyHeader,{{"PARTYID",
Int64.Type}, {"PARTYNAME", type text}, {"PARTYLOC", type text}, {"PARTYINCOME",
Int64.Type}, {"PARTYCODE", Int64.Type}}),
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 17
let
GetParty = Csv.Document(File.Contents("C:\DATA\PARTY_SRC.csv"),[Delimiter=",",
Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None]),
PartyHeader = Table.PromoteHeaders(GetParty, [PromoteAllScalars=true]),
#"Datatype change" = Table.TransformColumnTypes(PartyHeader,{{"PARTYID",
Int64.Type}, {"PARTYNAME", type text}, {"PARTYLOC", type text}, {"PARTYINCOME",
Int64.Type}, {"PARTYCODE", Int64.Type}}),
#"Rename columns" = Table.RenameColumns(#"Datatype change",{{"PARTYLOC",
"PARTY_LOCATION"}, {"PARTYNAME", "PARTY_NAME"}}),
#"Income filter" = Table.SelectRows(#"Rename columns", each [PARTYINCOME] >
15000),
#"Income hike column add" = Table.AddColumn(#"Income filter", "Income_Hike", each
[PARTYINCOME]+[PARTYINCOME] * 10/100)
in
#"Income hike column add"
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 18
FAQS
What is M Script?
This is a separate scripting language used in the POWER Query data extraction and filtrations.
Simple to operate and not many specifications or hierarchies required.
What is the need of understanding M-script in Real-time?
If some steps implemented on one query set, you want to use in your Query [Reusability].
Take the M-Script and use in your report with the required changes.
Can we add new steps in the between required steps?
Yes possible.
We can implement in two ways
a) M-Script manipulation
b) Go to steps-->right click--> Insert Step After
Can you define the auto generated steps in advanced editor and protocols?
What is the basic syntax:
let
Source=,
#"step1"=,
#"step2"=Operation(#"step1",....),
# "step3"=Operation(#"step2",....)
in #step3
Points to remember while understanding default M Script:
a) Started with let
b) Each step started with #, step name included in double quotes and separated with comma at
the end [default]
c) Last step does not include comma
d) Each new step contains previous step reference and respective operation
e) "in" always follows last step.
f) Each Query / Function contains one M-Script
g) There are certain reserved words for the operations
EX: Added Index
Added Custom
Added Conditional Column
Replaced Errors
Ex:
h) If multiple similar kind of operations take place, it increments with number
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 19
Ex:
Added Index
Added Index1
Added Custom
Added Custom1
Added Custom2
Script [Default script system generated]
let
Source = Excel.Workbook(File.Contents("C:\Users\Lenovo\Desktop\POWER
BI\DASHBOARDS_DATA\Classroom_Practices\Table_Matrix_Slicer_Filled_Map_Line\VINAYTECH_
BUSINESS_PAYMENT_DETAILS_DATAMODEL_DATASET.xlsx"), null, true),
FactPayments_Sheet = Source{[Item="FactPayments",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(FactPayments_Sheet,
[PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"InstituteID", type
text}, {"CourseID", type text},
{"ModeID", type text}, {"LocationID", type text}, {"Date", type date}, {"StudentID", Int64.Type},
{"Actual_Fee", Int64.Type}, {"Discount_Fee", Int64.Type}, {"Tax amount", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Amount_to_Institute", each
[Discount_Fee]-[Tax amount]),
#"Added Conditional Column" = Table.AddColumn(#"Added Custom", "Custom", each if
[StudentID] = 1097 then 14000 else if
[StudentID] = 1095 then 10000 else if [StudentID] = 1094 then 12000 else if [StudentID] = 1093
then "13000" else 15000, type any),
#"Added Conditional Column1" = Table.AddColumn(#"Added Conditional Column", "Rating",
each if [Tax amount] < 100 then "No GST" else if [Tax amount] > 100 then "GST Claimed" else if
[Tax amount] > 1000 then "Multiple GST" else "Not Applicable"),
#"Replaced Errors" = Table.ReplaceErrorValues(#"Added Conditional Column1", {{"Rating",
"NULL"}}),
#"Added Index" = Table.AddIndexColumn(#"Replaced Errors", "Index", 0, 1),
#"Added Index1" = Table.AddIndexColumn(#"Added Index", "Index.1", 20, 10)
In #"Added Index1"
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 20
Enter Data:
Helps to construct a table dynamically
Practical: Using excel for refresh and scheduled refresh, then configure like below
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 21
Power BI Cloud level always we need a relevant path than an absolute path for files.
File should have computer or server name followed by folder name.
a)Create a shared folder or identify a folder in a computer/ server
b)Edit Data Source and do like below in case you are using Vinaytech_Business_Details as source
What is the advantage of specifying server name / computer name method for files?
For dynamic configuration and to use at refresh / schedule refresh level
b)Configuring databases suitable for multiple environments with permissions
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 22
Normal permission for each data source, whereas global permission for all sources.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 23
a)Reverse rows :
Reverse rows from bottom to top, so that top rows moved to bottom and bottom rows to top.
b)Pivot column:
a) Converting rows into columns
b) Converting de-normalization to normalization model
c)UnPivot Column:
a) Converting columns into rows
b) Converting normalization to de-normalization model
Practice:
Create a table like below
a)Click Reverse Rows and see the output [Complete row reversed]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 24
c)Remove step b, implement Pivot Column, specify Pivot Value column: SALAMOUNT
Type of column
a)Structured column
b)Aggregate or expand column
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI(MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 25
Always allow: Always allow parameterization in data source and transformation dialogues
Query dependencies: View a dependency tree of all queries
What is the difference between distinct and unique in column distribution?
Column Distribution allows you to get a sense for the overall distribution of values within
a column in your data previews, including the count of distinct values (total number of
different values found in a given column) and unique values (total number of values that only
appear once in a given column)
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
IT Real-Time training that work for your career.
PROVIDED TRAINING FOR THOUSANDS OF STUDENTS .
SUBJECT, MATERIAL & VIDEOS
Trainings:
CLASS ROOM
VIDEOS ONLINE
PROVIDED
FAST TRACK
ONE ON ONE
PROJECT TRAINING
Address:
Flat No: 506/B
Nilgiri Block
Aditya Enclave
Data Types in Power BI [Power Query Level, Power View Level] Mytrivanam Area
Aggregations in Power BI [Default], Manual creation Hyderabad.
POWER BI DATA SET PROPERTIES [GROUPING, HIERARCHIES, HIDING,
DATE TABLE CONSIDER]
POWER BI HOME, MODEL, VIEW, FORMAT RIBBONS Website & Blog
BUTTONS, BOOK MARKS, DRILL DOWN REPORTING www.vinaytechhouse.com
FILTERS, TYPES OF FILTERS, DRILL THROUGH FILTER www.msbivinay.blogspot.in
SLICERS, SYNC SLICERS, DIFFERENCES WITH FILTERS
ROW LEVEL SECURITY AND DYNAMIC ROW LEVEL SECURITY Contact Information
INCREMENTAL REFRESH +91 9573168449
AGGREGATE TABLE AND MANAGE AGGREGATIONS 040 66638869
Query Diagnostics
This article describes data types supported in Power BI Desktop and Data Analysis Expressions
(DAX).
When you load data into Power BI Desktop, it will attempt to convert the data type of the
source column into a data type that better supports more efficient storage, calculations,
and data visualization. For example, if a column of values you import from Excel has no
fractional values, Power BI Desktop will convert the entire column of data to a Whole Number
data type, which is better suited for storing integers.
While in many cases DAX will implicitly convert a data type for you, there are some cases where
it will not. For instance, if a DAX function requires a Date data type and the data type for your
column is Text, the DAX function will not work correctly. So, it’s both important and useful to
get the correct data type for a column. In Power BI Desktop, you can determine and specify a
column’s data type in the Query Editor, or in Data View or Report View:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 2
The Data Type drop down in Query Editor has two data types not currently present in Data or
Report View: Date/Time/Timezone and Duration. When a column with these data types are
loaded into the model and viewed in Data or Report view, a column with a Date/Time/Timezone
data type will be converted into a Date/Time, and a column with a Duration data type is
converted into a Decimal Number.
Number Types
Decimal Number – Represents a 64 bit (eight-byte) floating point number. It’s the most
common number type and corresponds to numbers as you usually think of them. Although
designed to handle numbers with fractional values, it also handles whole numbers. The Decimal
Number type can handle negative values from -1.79E +308 through -3082.23E -, 0, and positive
values from 2.23E -308 through 1.79E + 308. For example, numbers like 34, 34.01, and
34.000367063 are valid decimal numbers. The largest value that can be represented in a Decimal
Number type is 15 digits long. The decimal separator can occur anywhere in the number. The
Decimal Number type corresponds to how Excel stores its numbers.
Fixed Decimal Number – Has a fixed location for the decimal separator. The decimal separator
always has four digits to its right and allows for 19 digits of significance. The largest
value it can represent is 922,337,203,685,477.5807 (positive or negative). The Fixed
Decimal Number type is useful in cases where rounding might introduce errors. When you work
with many numbers that have small fractional values they can sometimes accumulate and force
a number to be just slightly off. Since the values past the four digits to the right of decimal
separator are truncated, the Fixed Decimal type can help you avoid these kinds of errors. If
you’re familiar with SQL Server, this data type corresponds to SQL Server’s Decimal (19,4), or the
Currency Data type in Power Pivot.
Whole Number – Represents a 64 bit (eight-byte) integer value. Because it’s an integer, it
has no digits to the right of the decimal place. It allows for 19 digits; positive or negative whole
numbers between -9,223,372,036,854,775,808 (-2^63) and 9,223,372,036,854,775,807 (2^63-
1). It can represent the largest possible number of the various numeric data types. As with the
Fixed Decimal type, the Whole Number type can be useful in cases where you need to control
rounding.
Date/Time Types
Power BI Desktop supports five Date/Time data types in Query View and three in the Report
View and model. Both Date/Time/Timezone and Duration are converted during load into the
model.
Date/Time – Represents both a date and time value. Underneath the covers, the Date/Time
value is stored as a Decimal Number Type. So you can actually convert between the two. The
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 3
Date – Represents just a Date (no time portion). When converted into the model, a Date is the
same as a Date/Time value with zero for the fractional value.
Time – Represents just Time (no Date portion). When converted into the model, a Time value is
the same as a Date/Time value with no digits to the left of the decimal place.
Duration – Represents a length of time. It’s converted into a Decimal Number Type when
loaded into the model. As a Decimal Number type it can be added or subtracted from a
Date/Time field with correct results. As a Decimal Number type, you can easily use it in
visualizations that show magnitude.
Text type
Text - A Unicode character data string. Can be strings, numbers or dates represented in a text
format. Maximum string length is 268,435,456 Unicode characters (256 mega characters) or
536,870,912 bytes.
True/False type
Blanks/Nulls type
Blank - Is a data type in DAX that represents and replaces SQL nulls. You can create a blank by
using the BLANK function, and test for blanks by using the ISBLANK logical function.
DAX uses a table data type in many functions, such as aggregations and time intelligence
calculations. Some functions require a reference to a table; other functions return a table that
can then be used as input to other functions. In some functions that require a table as input,
you can specify an expression that evaluates to a table; for some functions, a reference to a base
table is required.
Each DAX function has specific requirements as to the types of data that are used as inputs and
outputs. For example, some functions require integers for some arguments and dates for others;
other functions require text or tables.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 4
If the data in the column you specify as an argument is incompatible with the data type
required by the function, DAX in many cases will return an error. However, wherever possible
DAX will attempt to implicitly convert the data to the required data type. For example:
• You can type a date as a string, and DAX will parse the string and attempt to cast it as
one of the Windows date and time formats.
• You can add TRUE + 1 and get the result 2, because TRUE is implicitly converted to the
number 1 and the operation 1+1 is performed.
• If you add values in two columns, and one value happens to be represented as text ("12")
and the other as a number (12), DAX implicitly converts the string to a number and then
does the addition for a numeric result. The following expression returns 44: = "22" + 22.
• If you attempt to concatenate two numbers, Excel will present them as strings and then
concatenate. The following expression returns "1234": = 12 & 34.
The type of conversion that is performed is determined by the operator, which casts the values
it requires before performing the requested operation. These tables list the operators, and
indicate the conversion that is performed on each data type in the column when it is paired with
the data type in the intersecting row.
Note: Text data types are not included in these tables. When a number is represented as in a
text format, in some cases Power BI will attempt to determine the number type and represent it
as a number.
Addition (+)
For example, if a real number is used in an addition operation in combination with currency
data, both values are converted to REAL, and the result is returned as REAL.
Subtraction (-)
In the following table the row header is the minuend (left side) and the column header is the
subtrahend (right side).
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 5
For example, if a date is used in a subtraction operation with any other data type, both values
are converted to dates, and the return value is also a date.
Note: Data models also support the unary operator, - (negative), but this operator does not
change the data type of the operand.
Multiplication(*)
For example, if an integer is combined with a real number in a multiplication operation, both
numbers are converted to real numbers, and the return value is also REAL.
Division (/)
In the following table, the row header is the numerator and the column header is the
denominator.
For example, if an integer is combined with a currency value in a division operation, both values
are converted to real numbers, and the result is also a real number.
Comparison operators
In comparison expressions, Boolean values are considered greater than string values and string
values are considered greater than numeric or date/time values; numbers and date/time values
are considered to have the same rank. No implicit conversions are performed for Boolean or
string values; BLANK or a blank value is converted to 0/""/false depending on the data type of
the other compared value.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 6
Conversions are performed implicitly for numeric or date/time types as described in the
following table:
In DAX, a null, blank value, empty cell, or a missing value are all represented by the same new
value type, a BLANK. You can also generate blanks by using the BLANK function, or test for
blanks by using the ISBLANK function.
How blanks are handled in operations such as addition or concatenation depends on the
individual function. The following table summarizes the differences between DAX and Microsoft
Excel formulas, in the way that blanks are handled.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 7
What is an aggregate?
• Sometimes you want to mathematically combine values in your data. The mathematical
operation could be sum, average, maximum, count, etc. When you combine values in
your data, it is called aggregating. The result of that mathematical operation is an
aggregate.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 8
Most datasets have more than one type of data. At the most basic level, the data is either
numeric or it is not.
• A)Numeric data can be aggregated using a sum, average, count, minimum, variance,
and much more.
• B)Even textual data, often called categorical data, can be aggregated. If you try to
aggregate a categorical field (by placing it in a numeric only bucket like Values or
Tooltips), Power BI will count the occurrences of each category or count the distinct
occurrences of each category.
• C)And special types of data, like dates, have a few of their own aggregate options:
earliest, latest, first, and last. Why don't aggregates work the way I want them to?
• Do Not Summarize. With this option chosen, each value in that field is treated separately and
not summarized. Use this option if you have a numeric ID column that shouldn't be summed.
• Count (Not Blanks). Counts the number of values in that field that are not blank.
• Standard deviation.
• Variance.
• Median. Shows the median (middle) value. This value has the same number of items above and
Note:
d)String column support limited operations [count, count distinct, group etc…]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 9
c)Date column [string operations + few additional [min, max, earlier etc…]
A: The field you've selected is likely a calculated measure or advanced measure created in Excel
or Power BI Desktop. Each calculated measure has its own hard-coded formula. You can’t
change the aggregation being used. For example, if it’s a sum, it can only be a sum. In the Fields
list, calculated measures are shown with the calculator symbol.
Q: My field is numeric, why are my only choices Count and Distinct count?
A1: The likely explanation is that the dataset owner has, accidentally or intentionally, not
classified the field as a number. For example, if a dataset has a year field, the dataset owner may
categorize that as text because it is more likely that the year field will be counted (for example,
number of people born in 1974) and not that it will be summed or averaged. If you are the
owner, you can open the dataset in Power BI Desktop and use the Modeling tab to change the
data type.
A2: If the field has a calculator icon, that means it's a calculated measure and each calculated
measure has its own hard-coded formula that can only be changed by a dataset owner. The
calculation being used may be a simple aggregation like an average or sum, but it may also be
something more complicated like a "percent of contribution to parent category" or "running
total since start of the year". Power BI isn't going to sum or average the results but will instead
just recalculate (using the hard-coded formula) for each data point.
A3: Another possibility is that you've dropped the field into a bucket that only allows
categorical values. In that case, your only options will be count and distinct count.
A4: And a third possibility is that you're using the field for an axis. On a bar chart axis, for
example, Power BI shows one bar for each distinct value -- it doesn't aggregate the field values
at all.
Note :The exception to this rule is scatter charts, which require aggregated values for the X and Y axes.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 10
Q: Why can't I aggregate text fields for SQL Server Analysis Services (SSAS) data sources?
A: Live connections to SSAS multidimensional models don't allow any client-side aggregations,
including first, last, avg, min, max, and sum.
Q: When I add a numeric field to a visualization, most of them default to sum but some default to
average or count or some other aggregation. Why isn't the default aggregation always the same?
A: Dataset owners have the option to set the default summarization for each field. If you are a
dataset owner, change the default summarization in the Modeling tab of Power BI Desktop.
Q: I'm a dataset owner and I want to ensure that a field is never aggregated.
A: In Power BI Desktop, in the Modeling tab, set Data type to Text.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 11
DimDate_cal =
ADDCOLUMNS (
CALENDAR (DATE(2000,1,1), DATE(2025,12,31)),
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
"Year", YEAR ( [Date] ),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
"YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 12
Does a table considered as Date table with date values gaps between?
No.
What are the minimal rules to consider a table as date table?
1. It should have a column with Unique values
2. There should be any gaps between them
3. Column should be of type Date
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 13
What is the advantage of Grouping values and how many types of grouping available?
Grouping helps for the below operations
a) Classifying the data for the desired data observation and to restrict rows
b) To perform aggregate operations easily
c) Easier analysis of data
There are two types of groups a) List b) Bin
List Group:
a) User selected values to be grouped
b) Two types groups
1. Manual Group with required values
2. Other Group for the non-grouping values
c) This is for all types of data types [String, Date and Numeric]
Example 1: Create three groups of data based on Discount Amount
a) Below 12500 b) Between 12500 to 20000 c) Unmatched data
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 14
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 15
Bin based on Bin size [It will create based on the size difference]
Testing with visual: Take a table, drag and drop group, discount fee and see the result.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 16
Example:
Create a date hierarchy (name it Date_Hierarchy) like this in DimDate table
Take Table visual→ drag and drop Date Hierarchy and Discount Fee and see the result.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 17
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 18
Practical:
Collect Smiths theme [available in Lab back up] from institute and import
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 19
IF(
ISFILTERED('DimDate'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power
BI-provided date hierarchy or primary date column."),
TOTALYTD(SUM('FactPayments'[Discount_Fee]), 'DimDate'[Date].[Date])
)
Linguistic Schema
Import or export the schema that Q&A uses to answer questions. This lets you customize it with
synonyms and phrasings for your data.
The language schema file to answer for Q&A.
Import Schema
Import Linguistic Schema from LSDL file. Unavailable for Direct Query, Live Connection, and On-
Premises Databases.
Export Schema
Export Linguistic Schema from LSDL file. Unavailable for Direct Query, Live Connection, and On-
Premises Databases.
What is the real-time advantage of Recent Sources?
Help you to quickly pull the data from the respective data source
Enter Data:
Helps to construct a table dynamically
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 20
Practical:
Edit Data Source and do like below in case you are using Vinaytech_Business_Details as source
What is the advantage of specifying servername / computer name method for files?
Refresh or scheduled refresh should happen properly.
Database screen shot…, global
Refresh: Refresh the data source queries.
Manage Parameters: Completed
Refresh Preview:
a)Refresh preview: Only for current query
b) Refresh All: For all queries refresh
Note:
Buttons, Images, Textboxes, and shapes covered in Buttons topic and various other topics
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 21
BUTTONS
What is Button?
It is an action performed based on event
How many buttons available?
Many buttons available {left arrow, right arrow, back, reset, Q&A, BookMark, Help etc…}
What are the major actions available?
Four actions a) Web Url b) Back c) Bookmark d) Q & A
With drillthrough in Power BI Desktop, you can create a page in your report that focuses on a
specific entity such as a supplier, customer, or manufacturer. Users can right-click on a data
point in other report pages. Then they can drill through to the focused page to get details that
are filtered to that context.
Without slicers if you want to see relevant information in other pages based on interest, drill
through is helpful.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 22
Q&A button:
a) On existing page, Drag and drop, specify Action [On] and choose Q&A from dropdown.
b)Control + Click on Q&A button will give you required QA window
a)Ensure you have bookmarks before this operation.[Create book marks if not available]
b)Drag and drop, specify Action [On] and choose Bookmark from dropdown list of bookmarks.
c)Control + Click on BookMark will give you required bookmark.
Note: Remaining buttons have the options of Back Button, Q&A and Book marks.
Page 1-→Drill through Page 2 → Page 2 click Back button, then go to Page1
Take Page 1, right button [put action back], when we click again we go back to page2.
Reset Button
If there are many slicers, and you want to reset the values, then use reset button.
Q: How do customers access the buttons in Power BI Service (is it through control +
enter)?
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 23
VIEW RIBBON
d) Field Properties--> Go to Fields Settings--> choose one column, it will show you the field
name, description etc... Information
Go to a page and tick mark selection pane, specify visuals to show / hide [Show all / Hide all
also available]
Lock aspect resize proportionally and Lock object does not move the object.
Page View Settings [For detailed information refer to Page Settings Topic@ ]
b) Fit to Width:
Contents are scaled to fit within the width of the page [vertical scroll bars added]
c) Actual Size:
contents are displayed at full size [Horizontal and vertical scroll bars added]
Means if he opens through phone app, then phone view, if he opens through web browser,
then desktop view.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 24
Phone view:
Save all
Performance Analyzer
Start monitoring your report to see details about the time taken by each visual
to query for its data and render the result
Practical:
Click Start Recording, and observe the visuals information
Click refresh visuals to see the statistics for the visuals if there are less no of records
Note:
Book marks and sync slicers covered in other topics
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 25
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 26
FILTERS IN POWER BI
What is filter?
Static data filtering is filter in Power BI.
Ex: Restricting only 2019 year data in the visual / page / report
How filter is different from slicer in Power BI (single line)?
Filter is static, before operations we specify. Whereas slicer is user interaction able filter, used at
dynamic report browse operations.
What is the relevant filter operation for Sync slicer?
Report level filter [across pages filter]
How All pages filter and Sync Slicer are different?
Sync slicer can be restricted to required or all pages, whereas All pages filter for the complete
report.
Q: Can you describe various filters and usage?
There are two types of filters
It is of four types
visual filter applies to a single visual on a report page. You only see visual level filters if you've
selected a visual on the report canvas.
Drill through filter applies to a single entity in a report, so that it provides drill from any other
page.
It is of two types
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 27
b) Advanced:
Used to define conditions, ranges, mathematical operations on filter values.
Note: Available on all filters except drill through
Example: Display locations starting with “h” or “v”
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 28
c) TOP N:
Used to filter based on "N" number of field values.
Note: a) Applicable only for "Visual Filters" with non-aggregate values.
b) Not applicable for visual filters with aggregate values.
Example: Display top CourseIds based on discount fee
Drill through
Scenario: In the below example Page 1 is having drill through enabled, so we can navigate
(pag2, page3) from other pages. The back button the page 1will move back to the actual page
where you did drill through.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 29
With drillthrough in Power BI Desktop, you can create a page in your report that focuses on a
specific entity such as a supplier, customer, or manufacturer. Users can right-click on a data
point in other report pages. Then they can drill through to the focused page to get details that
are filtered to that context.
Without slicers if you want to see relevant information in other pages based on interest, drill
through is helpful.
Step1:
Go to Page1, Visual Tab--> Drill through--> Drag and Drop LocationID
Note: Do not select any location [keep checkboxes as they appear]
Step2:
Go to Page 2--> Any Visual (Take Table Visual)--> Go to LocationID Field Any Value--> Right
Click--> Drill Through--> Page1
Step3:
Now Page1 displays the respective LocationID Information
Step4: (Back button operation)
Click Control + Enter key on Back Button on page1 to go back to Page2
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 30
Slicer:
User selected data display (Ex: Year, Location, Brand etc...) component is slicer.
Usually all visuals in the page are filtered with the data.
Sync slicer
User selected data display (Ex: Year, Location, Brand etc...) component is slicer.
Usually all visuals in the sync specified pages (close to report filter) are filtered with the
data.
Note: We can control the filtering or highlighting the visuals based on selection using Edit
Interactions of a visual
Q: What are the ways available to get conditional data[beyond filter] in Visuals?
Many ways:
a)INTERACTIVE VISUALS
b) INCLUDE [Respective category or value included] & EXCLUDE [Excluding Category or value]
c) SLICER VISUALIZATION & VISUAL SYNC
d) FILTERS: APPLICABLE FOR POWER BI CANVAS
e) PARAMETERS: APPLICABLE FOR POWER QUERY M LANGUAGE (ETL & DATA MODELING)
f) ROW LEVEL SECURITY
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 31
There are many different ways you can filter and highlight reports in Power BI.
1st way: Introduction to the filters pane:
You can apply filters in the Filters pane or by making selections in slicers directly on the report
itself. The Filters pane shows the tables and fields used in the report and the filters that have
been applied, if any.
There are four types of filters.
Page Filter: Page filter applies to all the visuals on the report page
Visual Filter: visual filter applies to a single visual on a report page. You only see visual level.
Report Filter: Report filter applies to all pages in the report
Drill through Filter: Drill through filter applies to a single entity in a report
If the filter has the word All: Means all the values in the field are included in the filter.
Filters in Reading or editing view
There are two modes for interacting with reports: Reading view and editing view. The filtering
capabilities available to you depend on which mode you're in.
EDITING VIEW READING VIEW
In Editing view, you can add report, page, In Reading view, you can interact with any
drillthrough, and visual filters. When you save filters that already exist in the report, and
the report, the filters are saved with the save the selections you make. You can't add
report, even if you open it in a mobile app. new filters.
People looking at the report in Reading view Note: Fields pane not visible here
can interact with the filters you added, but
can't add new filters.
Note: Fields pane visible here
Reading view is available in Power BI service The other Power BI service report mode is
for report consumers. When a colleague Editing view, which is available to report
shares a report with you, Reading view is your designers.
way to explore and interact with the report
Reading view is a powerful and safe way to
explore your dashboards and reports. While
you slice and dice the dashboards and
reports shared with you, the underlying data
sets remain intact and unchanged.
Reading view is a powerful and safe way to
explore your dashboards and reports. While
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 32
In Reading view, explore the data by modifying the existing filters. The changes you make are
saved with the report, even if you open the report in a mobile app. When you exit the report,
your filters are saved. To undo your filtering and return to the default filtering, slicing, drill, and
sorting set by the report author, select Reset to default from the top menubar.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 33
b) Go to Visual filter section, take a filter value in Basic or Advanced or Top N method
The visual changes to reflect the new filter. If you save your report with the filter, report readers
will see the visual filtered to begin with, and can interact with the filter in Reading view,
selecting or clearing values.
What will happen when Visual filter and page filter return different results?
There are situations where your visual-level filter and page-level filter may return different
results.
For example, when you add a visual-level filter, Power BI filters on the aggregated results. The
default aggregation is Sum, but you can change the aggregation type.
Then, when you add a page-level filter, Power BI filters without aggregating. It doesn't
aggregate because a page can have many visuals, each of which can utilize different
aggregation types. So the filter is applied on each data row.
How do you identify which pane you are in?
If you do not see the Fields pane, make sure you're in report Editing view
How do we remove all changes to the filters?
If you've made lots of changes to the filters and want to return to the report author default
settings, select Reset to default from the top menu bar.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 34
Email EmailI
EmailID
ID D
What do you mean by row level security and how is it helpful to customers?
It helps to see the respective users /locations / departments data.
Relation between permission and security?
First we should provide access / permission to user, when user connect with security
Then the respective data will open.
Scenario 1:
You have different locations data in the report, when a particular location user connects, he has
to see respective location data.
Ex: India manager has to see India sales
USA manager has to see USA sales
Modeling Ribbon-->Manage Roles--> New Role-->
DimLocation query-->Click Ellipse--> Locationname="India"
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 35
5. Go to View as role and change to User_Role, now it shows the respective user's data.
Verify
6. PUBLISH
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 36
Verify:
Connect to the Power Bi Service with the given credentials and verify required data
visibility.
Power BI Desktop
Power BI Service
Open the email of usery, click the report (open report button) and enter credentials (usery) and
then you will only usery details in the report.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 37
Scenario: I have multiple levels of managers and subordinates in the company. Need data
access according to the below situation.
a) If manager connects, he has to see according to his level of data [own + subordinates]
b) If Subordinate connects, simply he has to see his own data.
Note:
a) Row level security required. B) User table should have hierarchical data.
c) Manage Roles→ Security required multiple conditions.
a) Username (): Domain and user name [mostly at desktop suitable for operations]
b) Userprincipalname():Domain and user name at desktop. Takes emailid of the user
connected. [Used at Service]
c) Path: Gives you the path of user hierarchy including the current member
d) PathItem: Returns the item at the specified position from a string resulting from evaluation
of a PATH function. Positions are counted from left to right.
PATHITEM(<path>, <position>[, <type>])
e) LookupValue: Returns the value in result_columnName for the row that meets all criteria
specified by search_columnName and search_value.
Ex: User1 has level managers like manager2 (level1), manager3 (level2), manager4 (level3) etc...
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 38
Current Situation:
My company has 4 hierarchies,
Manager--> Assistant Manager--> Lead--> Team Member
a) When Team member connect, he has to see Team member billing only
b) When a particular level member connects, he has to see all subordinates details
[Ex: If Assistant manager connects, he has to see his information + Lead info + Team
members]
Level4 = LOOKUPVALUE (
Users[UserDesktopName],
Users[UserID],
PATHITEM ( Users[Managers_Hie], 4, 1 )
)
Execution process:
a)PathItem will get 4th position value in the hierarchy [ Ex: 1004]
b)Lookupvalue compares each userid {1001,1002,1003,1004} with path item result {1004} in the
manager hierarchy, if match found , it would return the desktopname.
Note: Each value passed to the hierarchy and ensure a particular level value.
Level3 = LOOKUPVALUE (
Users[UserDesktopName],
Users[UserID],
PATHITEM ( Users[Managers_Hie], 3, 1 )
)
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 39
Level2= LOOKUPVALUE (
Users[UserDesktopName],
Users[UserID],
PATHITEM ( Users[Managers_Hie], 2, 1 )
)
[UserDesktopName] = USERPRINCIPALNAME()
|| [Level4] = USERPRINCIPALNAME()
|| [Level3] = USERPRINCIPALNAME()
|| [Level2] = USERPRINCIPALNAME()
|| [Level1] = USERPRINCIPALNAME()
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 40
Verification:
Modelling menu→
a)View as Roles and specify role
It will now show you the respective user and subordinates data.
Power BI Service
Open the email of usery, click the report (open report button) and enter credentials (usery) and
then you will only see the usery details followed by his subordinate details in the report.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 41
FORMAT MENU
FORMAT MENU:
When you highlight a visual, this menu will appear. It has multiple options [see the pic]
Edit Interactions:
a) Minimum two visuals required on the page
b) One visual data change or navigation how do you want to track that change in other
visuals.
None: No Change
Highlight: Other visual respective data highlighted
Filter: Other visual data filtered
Practical to implement:
a)Take three visuals b) Format menu→ Edit Interactions c) In one of the visual mark highlight d)
Browse / filter in one visual data, then the visual which is highlighted with highlight the data
without cross filtering.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 42
Practical:
Look at the below scenario, if vizag is browsed in one visual, first visual is filtered ( as the option
set for filtering), second visual highlighted (as it is set), third one no change (as None
mentioned)
Format menu→ Edit interactions, go to each visual and specify the required option
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 43
The above options are similar to MS word and many other places options.
Align
Placing proper alignment of the visuals (center, middle, top, bottom etc….)
Practical:
Select one visual, specify align and required option
Distribution:
Visual horizon move / vertical move
Practical:
Select a visual and mention either horizontal or vertical
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 44
DRILLDOWN & DRILL THROUGH Implementation and ICONs used for operations
DrillDown: With in the visual navigating multiple levels [level down or up]
Up arrow--> one level up
Down arrow--> fixing one data point and going to one level down
Down two arrows--> complete one level down irrespective of data point’s height
Drill through:
Moving from one page to another page in the same report (drill through report),
Moving from one page in one report to another page in another report (drill through cross
report)
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 45
What is refresh?
In other words, changed data capturing based on interval and refreshing is called
incremental refresh.
Ex:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 46
Two areas
For large datasets to get required data and process this is helpful.
Three types
Note: Full refresh takes more time, more memory and many resources.
Incremental refresh enables very large datasets with the following benefits:
• Refreshes are faster - Only data that has changed needs to be refreshed.
For example, refresh only the last five days of a ten-year dataset.
• Refreshes are more reliable - It's no longer necessary to maintain long-running
connections to volatile source systems.
• Resource consumption is reduced - Less data to refresh reduces overall consumption
of memory and other resources.
Large datasets with potentially billions of rows may not fit into a Power BI Desktop model
because the PBIX file is limited by the memory resources available on the desktop computer.
Such datasets are therefore commonly filtered upon import. This type of filtering applies
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 47
whether using incremental refresh or not. For incremental refresh, you filter by using Power
Query date/time parameters.
Ensure you have FactPayments table with Date column [defined with DateTime]
FactPayments→Right Click→
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 48
Note: You can create parameters for startdate and enddate to get the relevant data for
incremental refresh [ refer to the next examples]
Detect Changes:
When you save these settings, data from the past 10 days will be loaded to your dataflow
storagethe next time this dataflow is refreshed. Subsequent refreshes will update only data
that’s changed in the past 5 days
A) In Power BI Desktop
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 49
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 50
b) Go to Power Query→
1. Ensure you have FactPayments table with Date column [defined with DateTime]
2.Create two parameters like below [one for startdate and another for range]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 51
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 52
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 53
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 54
A) In Power BI Desktop
STEP 1:
For incremental refresh, datasets are filtered by using Power Query date/time parameters with
the reserved, case-sensitive names RangeStart and RangeEnd. These parameters are used to
filter the data imported into Power BI Desktop, and also to dynamically partition the data into
ranges once published to the Power BI service. The parameter values are substituted by the
service to filter for each partition. There's no need to set them in dataset settings in the service.
Once published, the parameter values are overridden automatically by the Power BI service.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 55
To define the parameters with default values, in the Power Query Editor, select Manage
Parameters.
With the parameters defined, you can then apply the filter by selecting the Custom Filter menu
option for a column.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 56
Ensure rows are filtered where the column value is after or equal
to RangeStart and before RangeEnd. Other filter combinations may result in double counting
of rows.
Important
Verify queries have an equal to (=) on either RangeStart or RangeEnd, but not both. If the
equal to (=) exists on both parameters, a row could satisfy the conditions for two partitions,
which could lead to duplicate data in the model. For example,
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 57
Tip
While the data type of the parameters must be date/time, it's possible to convert them to match
the requirements of the datasource. For example, the following Power Query function converts a
date/time value to resemble an integer surrogate key of the form yyyymmdd, which is common
for data warehouses. The function can be called by the filter step.
Select Close and Apply from the Power Query Editor. You should have a subset of the dataset
in Power BI Desktop.
The filter on the date column is used to dynamically partition the data into ranges in the Power
BI service. Incremental refresh isn't designed to support cases where the filtered date column is
updated in the source system. An update is interpreted as an insertion and a deletion, not an
actual update. If the deletion occurs in the historical range and not the incremental range, it
won’t get picked up. This can cause data refresh failures due to partition-key conflicts.
Query folding
It's important the partition filters are pushed to the source system when queries are submitted
for refresh operations. To push filtering down means the datasource should support query
folding. Most data sources that support SQL queries support query folding. However, data
sources like flat files, blobs, web, and OData feeds typically do not. In cases where the filter is
not supported by the datasource back-end, it cannot be pushed down. In such cases, the
mashup engine compensates and applies the filter locally, which may require retrieving the full
dataset from the data source. This can cause incremental refresh to be very slow, and the
process can run out of resources either in the Power BI service or in the on-premises data
gateway if used.
Given the various levels of query folding support for each datasource, it's recommended that
verification is performed to ensure the filter logic is included in the source queries. To make this
easier, Power BI Desktop attempts to perform this verification for you. If unable to verify, a
warning is displayed in the incremental refresh dialog when defining the incremental refresh
policy. SQL based data sources such as SQL, Oracle, and Teradata can rely on this warning.
Other data sources may be unable to verify without tracing queries. If Power BI Desktop is
unable to confirm, the following warning is displayed.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 58
Incremental refresh is available on the context menu for tables, except for Live Connection
models.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 59
The incremental refresh dialog is displayed. Use the toggle to enable the dialog.
Note
If the Power Query expression for the table doesn't refer to the parameters with reserved
names, the toggle is disabled.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 60
Refresh ranges
The following example defines a refresh policy to store data for five full calendar years plus data
for the current year up to the current date, and incrementally refresh ten days of data. The first
refresh operation loads historical data. Subsequent refreshes are incremental, and (if scheduled
to run daily) perform the following operations:
The first refresh in the Power BI service may take longer to import all five full calendar years.
Subsequent refreshes may be finished in a fraction of the time.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 61
Note
Definition of these ranges might be all you need, in which case you can go straight to the
publishing step below. The additional dropdowns are for advanced features.
Incremental refresh of ten days is more efficient than full refresh of five years. However, it's
possible to do even better. If you select the Detect data changes checkbox, you can select a
date/time column used to identify and refresh only the days where the data has changed. This
assumes such a column exists in the source system, which is typically for auditing purposes. This
should not be the same column used to partition the data with the RangeStart/RangeEnd
parameters. The maximum value of this column is evaluated for each of the periods in the
incremental range. If it has not changed since the last refresh, there is no need to refresh the
period. In the example, this could further reduce the days incrementally refreshed from ten to
around two.
Tip
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 62
The current design requires that the column to detect data changes is persisted and cached into
memory. You may want to consider one of the following techniques to reduce cardinality and
memory consumption.
Persist only the maximum value of this column at time of refresh, perhaps using a Power Query
function.
Reduce the precision to a level that is acceptable given your refresh-frequency requirements.
We plan to allow the definition of custom queries for data-change detection at a later date. This
could be used to avoid persisting the column value altogether.
Let's say your refresh is scheduled to run at 4:00 AM every morning. If data appears in the
source system during those 4 hours, you may not want to account for it. Some business metrics
-- such as barrels per day in the oil and gas industry -- make no sense with partial days.
Another example is refreshing data from a financial system where data for the previous month is
approved on the 12th calendar day of the month. You could set the incremental range to 1
month and schedule the refresh to run on the 12th day of the month. With this option checked,
it would for example refresh January data on February 12th.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 63
Note
Refresh operations in the service run under UTC time. This can determine the effective date and
affect complete periods. We plan to add the ability to override the effective date for a refresh
operation.
Since incremental refresh is a Premium only feature, the publish dialog only allows selection of a
workspace on Premium capacity.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 64
You can now refresh the model. The first refresh may take longer to import the historical data.
Subsequent refreshes can be much quicker because they use incremental refresh.
Query timeouts
Most relational sources allow overriding timeouts in the M expression. For example, the
expression below uses the SQL Server data-access function to set it to 2 hours. Each period
defined by the policy ranges submits a query observing the command timeout setting.
Powerquery:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 65
let
Source = Sql.Database("myserver.database.windows.net", "AdventureWorks",
[CommandTimeout=#duration(0, 2, 0, 0)]),
dbo_Fact = Source{[Schema="dbo",Item="FactInternetSales"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_Fact, each [OrderDate] >= RangeStart and
[OrderDate] < RangeEnd)
in
#"Filtered Rows"
Limitations
Currently, for composite models, incremental refresh is supported for SQL Server, Azure SQL
Database, SQL Data Warehouse, Oracle, and Teradata data sources only.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 66
The aggregated table is a table in Power BI aggregated by one or more fields from the
DirectQuery source table.
In our case, Aggregated table, would be a grouped table by specific fields from the
FactInternetSales table.
The aggregated table can be created by all possible methods. You can create the aggregated
table with T-SQL statements from SQL Server. Or you can create it in Power Query. You
can create it in all other data transformation tools and query languages possible.
The aggregated table can be created in the data source with T-SQL queries, or in Power Query,
or anywhere else that you can create a grouped table.
Assign aggregations:
Using aggregations in Power BI enables interactive analysis over big data in ways that
previously weren't possible. Aggregations can dramatically reduce the cost of unlocking large
datasets for decision making.
• Query performance over big data - as users interact with visuals on Power BI reports,
DAX queries are submitted to the dataset. Boost query speeds by caching data at the
aggregated level, using a fraction of the resources required at the detail level. Unlock big
data in a way that would otherwise be impossible.
• Data refresh optimization - reduce cache sizes and refresh times by caching data at the
aggregated level. Speed up the time to make data available for users.
• Achieve balanced architectures - allow the Power BI in-memory cache to handle
aggregated queries, which it does effectively. Limit queries sent to the data source in
DirectQuery mode, helping stay within concurrency limits. Queries that do get through
tend to be filtered, transactional-level queries, which data warehouses and big-data
systems normally handle well.
Table-Level Storage
Aggregations are used with data sources representing dimensional models, such as a data
warehouses, data marts, and Hadoop-based big-data sources.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 67
All Power BI Import and (non-multidimensional) DirectQuery sources work with aggregations.
Aggregations based on relationships are typically used with dimensional models. Power BI
datasets that source from data warehouses and data marts resemble star/snowflake schemas
with relationships between dimension tables and fact tables.
Strong relationships include the following combinations where both tables are from a single
source.
Dual Dual
The only case where a cross-source relationship is considered strong is if both tables are Import.
Many-to-many relationships are always considered weak.
For cross-source aggregation hits that don't depend on relationships, see section below on
aggregations based on group-by columns.
Users with read-only access to the dataset can't query aggregation tables. This avoids security
concerns when used with RLS. Consumers and queries refer to the detail table, not the
aggregation table; they don't even need to know the aggregation table exists.
For this reason, the Aggregate table should be hidden. If it isn't, the Manage aggregations
dialog will set it to hidden upon clicking the Apply all button.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 68
PRACTICAL
Step 1:
Step 2:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 69
Step 3:
Step 4:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 70
Step 5:
Change the data type of Count to Whole Number with the below process
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 71
Step 6:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 72
Step 7:
Now the table visual values retrieved from aggregate table instead of FactPayments table.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 73
QUERY DIAGNOSTICS
To use Query Diagnostics, go to the 'Tools' tab in the Power Query Editor ribbon.
Concept
Non-Admin Diagnostics
With our initial release, there were a number of users who were unable to properly run it due
to requiring administrative rights (depending on IT policy). We’ve fixed this by adding a
non-admin option.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 74
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 75
Types of Diagnostics
You’re able to run Query Diagnostics in two primary ways: Diagnose Step, and recording
Diagnostics.
Diagnose Step is a more limited feature that allows you to see what’s happening with just
your current step
Recording Diagnostics allows you to record the evaluations by Power Query for any action you
take, ranging from applying a filter to a full refresh in Power BI.
Every time you finish recording traces, Query Diagnostics will surface an aggregated table
meant for easier readability and decision making, and a more detailed table meant for building
visualizations.
Decomposition Tree
Query Diagnostics works great with the new Decomposition Tree feature in Power BI. If you
hook it up right, you can easily parse operations and understand how total time breaks down
between actions. For example, I use it to understand how time was spent in various emitted
native queries.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 76
Whenever you start diagnostics, Power Query will begin tracing any evaluations that you cause.
The evaluation that most users think of is when you press refresh, or when you retrieve data for
the first time, but there are many actions that can cause evaluations depending on the
connector. For example, with the SQL connector, when you retrieve a list of values to filter, that
would kick off an evaluation as well—but it doesn’t associate with a user query, and that’s
represented in the diagnostics. Other system generated queries might include Navigator or “Get
Data” experience.
When you press 'Diagnose Step', Power Query runs a special evaluation of just the step you're
looking at and shows you the diagnostics for that step, without showing you the diagnostics for
other steps in the query. This can make it much easier to get a narrow view into a problem.
It's important that if you're recording all traces that from 'Start Diagnostics' that you press 'Stop
diagnostics'. This will allow the engine to collect the recorded traces and parse them into the
proper output. Without this step you'll lose your traces.
We currently present two views whenever you get diagnostics: The summarized view is aimed to
give you an immediate insight into where time is being spent in your query. The detailed view is
much deeper, line by line, and will generally only be needed for serious diagnosing by power
users.
Some capabilities, like the “Data Source Query” column, are currently available only on certain
connectors. We will be working to extend the breadth of this coverage in the future.
Note
Power Query may perform evaluations that you may not have directly triggered. Some of these
evaluations are performed in order to retrieve metadata so we can best optimize our queries or
to provide a better user experience (such as retrieving the list of distinct values within a column
that are displayed in the Filter Rows experience), and others might be related to how a
connector handles parallel evaluations. At the same time, if you see in your query diagnostics
repeated queries that you don't believe make sense, feel free to reach out through normal
support channels--your feedback is how we improve our product.
Query diagnostics provides two views: summarized and detailed. The summarized view
“collapses” multiple related operations into a single operation. In this process, details collected
by each operation are combined, and the exclusive durations are summed. No information is
lost as part of this process.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 77
The summarized view provides an overview of what occurred during an evaluation for easy high
level review. If for a specific operation, further breakdown is desired, the user can look at the
group id and view the corresponding operations that were grouped within the detail view.
When refreshing in the Power Query Editor, there's a lot done behind the scenes to attempt to
give you a fluent user experience. As an example, when you ‘Refresh Preview’ the evaluator will
execute the final step of each given Query, but then in the background it will sequentially run n-
1 steps, n-2, steps, etc., so that if you step back through your steps it’s already available.
To keep this performant, currently some caching happens so that it doesn’t have to rerun every
part of the final query plan as it goes back through the steps. While this is useful for normal
authoring, it means that you will not always get correct step comparison information due to
later evaluations pulling on cached data.
Diagnostics Schema
Id
When analyzing the results of a recording, it’s important to filter the recording session by Id, so
that columns such as Exclusive Duration % make sense.
Id is a composite identifier. It’s comprised of two numbers—one before the dot, and one after.
The first number will be the same for all evaluations that resulted from a single user action. In
other words, if I press refresh twice there’ll be two different numbers leading the dot, one for
each user activity taken. This will be sequential for a given diagnostics recording.
The second number represents an evaluation by the engine. This will be sequential for the
lifetime of the process where the evaluation is queued. If you run multiple diagnostics recording
sessions, you will see this number continue to grow across the different sessions. To summarize,
if I start recording, press evaluation once, and stop recording, I’ll have some number of Ids in
my diagnostics, but since I only took one action, they’ll all be 1.1, 1.2, 1.3, etc.
The combination of the activityId and the evaluationId, separated by the dot, provides a unique
identifier for an evaluation for a single recording session.
Query
The name of the Query in the left-hand pane of the Power Query editor.
Step
The name of the Step in the right-hand pane of the Power Query editor. Things like filter
dropdowns will generally associate with the step you’re filtering on, even if you’re not refreshing
the step.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 78
Category
This tells you what sort of data source you’re accessing, such as SQL or Oracle.
Operation
The actual operation being performed. This can include evaluator work, opening connections,
sending queries to the data source, and many more.
Start Time
End Time
The Exclusive Duration column of an event is the amount of time the event was active. This
contrasts with the "duration" value that results from subtracting the values in an event's Start
Time column and End Time column. This "duration" value represents the total time the elapsed
between when an event began and when it ended, which may include times the event was in a
suspended or inactive state and another event was consuming resources.
Exclusive Duration
The absolute time, rather than %, of exclusive duration. The total duration (i.e. exclusive duration
+ time when the event was inactive) of an evaluation can be calculated in one of two ways:
1. Find the operation called “Evaluation”. The difference between End Time - Start Time will
result in the total duration of an event.
2. Subtract the minimum start time of all operations within an event from the maximum end
time. Note that in cases when the information collected for an event does not account for
the total duration, an operation called “Trace Gaps” will be generated to account for this
time gap.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 79
Resource
The resource you’re accessing for data. The exact format of this resource will depend on the
data source.
Power Query does something called ‘Folding’, which is the act of running as many parts of the
query against the back-end data source as possible. In Direct Query mode (over Power Query),
where enabled, only transforms that fold will run. In import mode, transforms that can’t fold will
instead be run locally.
The Data Source Query column allows you to see the query or HTTP request/response sent
against the back-end data source. As you author your Query in the Editor, many Data Source
Queries will be emitted. Some of these are the actual final Data Source Query to render the
preview, but others may be for Data Profiling, Filter dropdowns, information on joins, retrieving
metadata for schemas, and any number of other small queries.
In general, you shouldn’t be concerned by the number of Data Source Queries emitted unless
there are specific reasons to be concerned, and should focus instead on making sure the proper
content is being retrieved. This column might also help determine if the Power Query evaluation
was fully folded.
Additional Info
There is a lot of information retrieved by our connectors. Many of it is ragged and doesn’t fit
well into a standard columnar hierarchy. This is put in a record in the additional info column.
Information logged from custom connectors will also appear here.
Row Count
The number of rows returned by a Data Source Query. Not enabled on all connectors.
Content Length
Content length returned by HTTP Requests, as commonly defined. This isn’t enabled in all
connectors, and it won’t be accurate for connectors that retrieve requests in chunks.
Is User Query
Boolean, indicates if it is a query authored by the user, and present in the left hand pane or if it
was generated by some other user action. Other user actions can include things such as Filter
selection, or using the Navigator in the Get Data experience.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 80
Path
Path represents the relative route of the operation when viewed as part of an interval tree for all
operations within a single evaluation. At the top (root) of the tree there’s a single operation
called “Evaluation” with path “0”. The start time of this evaluation corresponds to the start of this
evaluation as a whole. The end time of this evaluation shows when the whole evaluation
finished. This top level operation has an exclusive duration of 0, as its only purpose it to serve as
the root of the tree. Further operations branch from the root. For example, an operation may
have “0/1/5” as a path. This would be understood as:
• 0: tree root
• 1: current operation’s parent
• 5: index of current operation
Operation “0/1/5”, might have a child node, in which case, the path will have the form “0/1/5/8”,
with 8 representing the index of the child.
Group ID
Combining two (or more) operations will not occur if it leads to detail loss. The grouping is
designed to approximate “commands” executed during the evaluation. In the detailed view,
multiple operations will share a Group Id, corresponding to the groups that are aggregated in
the Summary view.
As with most columns, the group id is only relevant within a specific evaluation, as filtered by
the Id column.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 81
While you may get a similar result at the end of an authoring workflow, refreshing in the editor,
or refreshing in Power BI proper, very different evaluations are run by the software for the
different user experiences provided. It's important to know what to expect when doing query
diagnostics in these different workflows so you aren't surprised by the very different diagnostic
data.
To start Query Diagnostics, go to the 'Tools' tab in the Power Query Editor ribbon. You're
presented here with a few different options.
There are two primary options here, 'Diagnose Step' and 'Start Diagnostics' (paired with 'Stop
Diagnostics'). The former will give you information on a query up to a selected step, and is most
useful for understanding what operations are being performed locally or remotely in a query.
The latter gives you more insight into a variety of other cases, discussed below.
Connector Specifics
It's important to mention that there is no way to cover all the different permutations of what
you'll see in Query Diagnostics. There are lots of things that can change exactly what you see in
results:
• Connector
• Transforms applied
• System that you're running on
• Network configuration
• Advanced configuration choices
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 82
• ODBC configuration
For the most broad coverage this documentation will focus on Query Diagnostics of the
Northwind Customers table, both on SQL and OData. The OData notes use the public endpoint
found at the OData.org website, while you'll need to provide a SQL server for yourself. Many
data sources will differ significantly from these, and will have connector specific documentation
added over time.
'Start Diagnostics' and 'Stop Diagnostics' are more broadly applicable than 'Diagnose Step', but
will also give you a lot more information that you'll need to sort through. For example, starting
diagnostics, refreshing a preview, and then stopping will give you equivalent information to
running Diagnose Step on every step (due to how Power Query works in the editor to refresh
each step independently).
To start recording, click 'Start Diagnostics', perform whatever evaluations you want (authoring,
preview refresh, full refresh), and then click 'Stop Diagnostics'.
Authoring
The authoring workflow's primary difference is that it will generally generate more individual
evaluations than seen in other workflows. As discussed in the primary Query Diagnostics article,
these are a result of populating various user interfaces such as the navigator or filter
dropdowns.
We're going to walk through an example. We're using the OData connector in this sample, but
when reviewing the output we'll also look at the SQL version of the same database. For both
data sources, we're going to connect to the data source via 'New Source', 'Recent Sources', or
'Get Data'. For the SQL connection you'll need to put in credentials for your server, but for the
public OData endpoint you can put in the endpoint linked above.
Once you connect and choose authentication, select the 'Customers' table from the OData
service.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 83
This will present you with the Customers table in the Power Query interface. Let's say that we
want to know how many Sales Representatives there are in different countries. First, right click
on 'Sales Representative' under the 'Contact Title' column, mouse over 'Text Filters', and select
'Equals'.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 84
Now, select 'Group By' from the Ribbon and do a grouping by 'Country', with your aggregate
being a 'Count'.
This should present you with the same data you see below.
Finally, navigate back to the 'Tools' tab of the Ribbon and click 'Stop Diagnostics'. This will stop
the tracing and build your diagnostics file for you, and the summary and detailed tables will
appear on the left-hand side.
If you trace an entire authoring session, you will generally expect to see something like a source
query evaluation, then evaluations related to the relevant navigator, then at least one query
emitted for each step you apply (with potentially more depending on the exact UX actions
taken). In some connectors, parallel evaluations will happen for performance reasons that will
yield very similar sets of data.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 85
Refresh Preview
When you have finished transforming your data, you have a sequence of steps in a query. When
you press 'Refresh Preview' or 'Refresh All' in the Power Query editor, you won't see just one
step in your query diagnostics. The reason for this is that refreshing in the Power Query Editor
explicitly refreshes the query ending with the last step applied, and then steps back through the
applied steps and refreshes for the query up to that point, back to the source.
This means that if you have five steps in your query, including Source and Navigator, you will
expect to see five different evaluations in your diagnostics. The first one, chronologically, will
often (but not always) take the longest. This is due to two different reasons:
• It may potentially cache input data that the queries run after it (representing earlier steps
in the User Query) can access faster locally.
• It may have transforms applied to it that significantly truncate how much data has to be
returned.
Note that when talking about 'Refresh All' that it will refresh all queries and you'll need to filter
to the ones you care about, as you might expect.
Full Refresh
Query Diagnostics can be used to diagnose the so-called 'final query' that is emitted during the
Refresh in Power BI, rather than just the Power Query editor experience. To do this, you first
need to load the data to the model once. If you are planning to do this, make sure that you
realize that if you press 'Close and Apply' that the editor window will close (interrupting tracing)
so you either need to do it on the second refresh, or click the dropdown icon under 'Close and
Apply' and press 'Apply' instead.
Either way, make sure to press 'Start Diagnostics' on the Diagnostics section of the 'Tools' tab in
the editor. Once you've done this refresh your model, or even just the table you care about.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 86
Once it's done loading the data to model, press 'Stop' diagnostics.
You can expect to see some combination of metadata and data queries. Metadata calls grab the
information it can about the data source. Data retrieval is about accessing the data source,
emitting the final built up Data Source Query with folded down operations, and then
performing whatever evaluations are missing on top, locally.
It's important to note that just because you see a resource (database, web endpoint, etc.) or a
data source query in your diagnostics, it doesn't mean that it's necessarily performing network
activity. Power Query may retrieve this information from its cache. In future updates, we will
indicate whether or not information is being retrieved from the cache for easier diagnosis.
Diagnose Step
'Diagnose Step' is more useful for getting an insight into what evaluations are happening up to
a single step, which can help you identify, up to that step, what performance is like as well as
what parts of your query are being performed locally or remotely.
If you used 'Diagnose Step' on the query we built above, you'll find that it only returns 10 or so
rows, and if we look at the last row with a Data Source Query we can get a pretty good idea of
what our final emitted query to the data source will be. In this case, we can see that Sales
Representative was filtered remotely, but the grouping (by process of elimination) happened
locally.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 87
If you start and stop diagnostics and refresh the same query, we get 40 rows due to the fact
that, as mentioned above, Power Query is getting information on every step, not just the final
step. This makes it harder when you're just trying to get insight into one particular part of your
query.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 88
Once you've recorded the diagnostics you want to use, the next step is being able to
understand what they say.
It's helpful to have a good understanding of what exactly each column in the query diagnostics
schema means, which we're not going to repeat in this short tutorial. There's a full writeup of
that here.
In general, when building visualizations, it's better to use the full detailed table because
regardless of how many rows it is, what you're probably looking at is some kind of depiction of
how the time spent in different resources adds up, or what the native query emitted was.
As mentioned in our article on recording the diagnostics, I'm working with the OData and SQL
traces for the same table (or very nearly so)--the Customers table from Northwind. In particular,
I'm going to focus on common ask from our customers, as well as one of the most easy to
interpret sets of traces: full refresh of the data model.
When going through traces, there are a lot of ways you can evaluate them. In this article we're
going to focus on a two visualization split--one to show the details you care about, and the
other to easily look at time contributions of various factors. For the first visualization, a table is
used. You can pick any fields you like, but the ones recommended for an easy, high level look at
what's going on are:
• Id
• Start Time
• Query
• Step
• Data Source Query
• Exclusive Duration (%)
• Row Count
• Category
• Is User Query
• Path
For the second visualization, one choice is to use a Stacked Column Chart. In the 'Axis'
parameter, you might want to use 'Id' or 'Step'. If we're looking at the Refresh, because it
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 89
doesn't have anything to do with steps in the Editor itself, we probably just want to look at 'Id'.
For the 'Legend' parameter you should set 'Category' or 'Operation' (depending on the
granularity you want). For the 'Value', set 'Exclusive Duration' (and make sure it's not the %, so
that you get the raw duration value). Finally, for the Tooltip, set 'Earliest Start Time'.
Once your visualization is built, make sure you sort by 'Earliest Start Time' ascending so you can
see the order things happen in.
While your exact needs might differ, this combination of charts is a good place to start for
looking at a lot of diagnostics files and for a number of purposes.
As mentioned above, there's a lot of questions you can try to answer with query diagnostics, but
the two that we see the most often are asking how time is spent, and asking what the query
sent to the source is.
Asking how the time is spent is easy, and will be very similar for most connectors. A warning
with query diagnostics, as mentioned elsewhere, is that you'll see drastically different
capabilities depending on the connector. For example, many ODBC based connectors won't
have an accurate recording of what query is sent to the actual back-end system, as Power Query
only sees what it sends to the ODBC driver.
If we want to see how the time is spent, we can just look at the visualizations we built above.
Now, because the time values for the sample queries we're using here are so small, if we want to
work with how Power BI reports time it's better if we convert the Exclusive Duration column to
'Seconds' in the Power Query editor. Once we do this, we can look at our chart and get a pretty
decent idea of where time is spent.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 90
For my OData results, I see in the image that the vast majority of the time spent was retrieving
the data from source--if I click on the 'Data Source' item on the legend, it'll show me all of the
different operations related to sending a query to the Data Source.
If we perform all the same operations and build similar visualizations, but with the SQL traces
instead of the ODATA ones, we can see how the two data sources compare!
If we click the Data Source table, like with the ODATA diagnostics we can see the first evaluation
(2.3 in this image) emits metadata queries, with the second evaluation actually retrieving the
data we care about. Because we're retrieving very little data in this case the data pulled back
takes very little time (less than a tenth of a second for the entire second evaluation to happen,
with less than a twentieth of a second for data retrieval itself), but that won't be true in all cases.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 91
As above, we can click the 'Data Source' category on the legend to see the emitted queries.
Looking at paths
When you're looking at this, if it seems like time spent is strange--for example, on the OData
query you might see that there's a Data Source Query with the following value:
Request:Copy
https://services.odata.org/V4/Northwind/Northwind.svc/Customers?$filter=ContactTitle%20eq%20
%27Sales%20Representative%27&$select=CustomerID%2CCountry HTTP/1.1
Content-Type:
application/json;odata.metadata=minimal;q=1.0,application/json;odata=minimalmetadata;q=0.9,a
pplication/atomsvc+xml;q=0.8,application/atom+xml;q=0.8,application/xml;q=0.7,text/plain;q=0
.7
<Content placeholder>
Response:
Content-Type:
application/json;odata.metadata=minimal;q=1.0,application/json;odata=minimalmetadata;q=0.9,a
pplication/atomsvc+xml;q=0.8,application/atom+xml;q=0.8,application/xml;q=0.7,text/plain;q=0
.7
Content-Length: 435
<Content placeholder>
This Data Source Query is associated with an operation that only takes up, say, 1% of the
Exclusive Duration. Meanwhile, there's a very similar one:
Copy
Request:
GET https://services.odata.org/V4/Northwind/Northwind.svc/Customers?$filter=ContactTitle eq
'Sales Representative'&$select=CustomerID%2CCountry HTTP/1.1
Response:
https://services.odata.org/V4/Northwind/Northwind.svc/Customers?$filter=ContactTitle eq
'Sales Representative'&$select=CustomerID%2CCountry
HTTP/1.1 200 OK
This Data Source Query is associated with an operation that takes up nearly 75% of the Exclusive
Duration. If you turn on the Path, you discover the latter is actually a child of the former. This
means that the first query basically added very little time on its own, with the actual data
retrieval being tracked by the 'inner' query.
These are extreme values, but they're within the bounds of what might be seen.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
POWER BI (MATERIAL-1: DESKTOP, MODEL, & PROJECTS MATERIAL-2: DAX, SERVICE, SERVER, & OTHERS]) 92
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
IT Real-Time training that work for your career.
PROVIDED TRAINING FOR THOUSANDS OF STUDENTS .
SUBJECT, MATERIAL & VIDEOS
Trainings:
CLASS ROOM
VIDEOS ONLINE
PROVIDED
FAST TRACK
ONE ON ONE
PROJECT TRAINING
Address:
Flat No: 506/B
Nilgiri Block
Aditya Enclave
What is Visual, how many types available?
Mytrivanam Area
Differences between single value and multi value visual?
Table visual and Matrix visual detailed practical Hyderabad.
Charts of all categories [stacked, 100% stacked, clustered,
bar, column, tree map, funnel, waterfall, line, area, scatter, Website & Blog
and mixed charts] www.vinaytechhouse.com
www.msbivinay.blogspot.in
Maps [normal, filled, shape, and ARCGIS]
Card and Multi row card for value or rows display Contact Information
KPI and Gauge for indicators display +91 9573168449
Different types of Slicers usage 040 66638869
Table, Chart [all charts], Matrix, Maps, Multi Row Card etc…
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 2
a) Field Properties
c)Some visuals take Axis, Legend, Category, Value etc…sections to take fields.
Note:
1. Axis is parent parent category for few visuals, legend / detail is child category for
few visuals.
2. Value section always take numeric value or a measure created.
b) Format Properties
1) General
2)Style
3)Grid
4)Column Headers
a)Font color b) Backgroud color c)Outline d)Text Size e) Font Family f) Alignment
g)Outline(None, left, right, left+right, frame etc…) h)Word wrap
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 3
5)Values
a)Font color b) Backgroud color c)Outline d)Text Size e) Font Family f) Alignment
g)Outline(None, left, right, left+right, frame etc…) h)Word wrap i)Alternate Font Color
6)Total
a)Total (on) b) Total Label c)Font color d) Backgroud color e)Outline f)Text Size g) Font Family
h)Outline(None, left, right, left+right, frame etc…) i)Word wrap
Ex: LocationID field background color yellow and font color blue
a)Field selection b)Background color (advanced control, adjust) c) Font color (advanced control,
adjust) d)Databars (adjust) e) Indicators (adjust)
Note: To show KPIs for field values indicators are helpful. So practice this.
Example1: DiscountFee display the color in a range from light to blue to dark blue
i)Title
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 4
Example2: DiscountFee less than 50000 then red, between 50000 and 100000 yellow,
above 100000 green background colors
Example3: DiscountFee less than 0 then red color, and more than 0 then green color for font
9)Title
a)Title (on) b)Title Text c)Font color d) Backgroud color e)Text Size f) Font Family h)Alignment
i)Word wrap
10)Background
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 5
11)Lock Aspect
Example: Take a chart, on the right top corner when you expand....
12)Border
a)Color b)Radius
13)Tooltip
a)Type b)Pages c) Label color d)Value color e)Text Size f)Font g)Background color
h)transparency
l)Visual Header
a)On / off b)Background color c)Border d)transparency e)Icon color f)Visual Information Icon
g)Visual Warning icon h)Visual error icon i)Drill on dropdown
j)Drill up icon k)Drilldown icon l)Show next level icon m)Expand to next level icon
n)Pin icon o)Focus mode icon p) See data layout icon q)More option icon r)Filter icon
A:Conditional Formatting
A: Intermediate value
Q:What is the best way to have uniform colors, fonts across reports?
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 6
WORKING WITH
VISUALIZATIONS 126
Textual (can have sub textual) values compared with minimum one Measurable value.
In case of Mixed Chart, One Textual and Two Measures Required.
CHARTS In case of Scatter Chart, One Textual and Three Measurable Required.
AXIS, LEGEND,
AXIS [ ROW / COLUMN MAIN CATEGORY DATA], LEGEND [SUB CATEGORY
VALUE
ARRANGEMENT FOR THE MAIN], VALUE [MEASURE FOR INSIGHT]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 7
VISUAL IN AREA FILLING DIFFERENT FROM BAR AND LINE FOR AREA COVERAGE
MIXED CHARTS
[LINE AND STACKED VISUAL IN BARS AND LINES.
COLUMN, LINE AND
COMPARISON AND DISTRIBUTION. BUT, TWO MEASURES REQUIRED. ONE FOR COMPARING
CLUSTERED
COLUMN] [FOR LINE], AND ANOTHER ONE FOR DISTRIBUTION [STACKED]
VISUAL IN BUBBLES.
BASED ON VALUES IT WILL SHOW YOU TREE FADES [HIGHEST VALUE MORE
TREE MAP CHART SPACE AND BEGINNING, LOWEST VALUE AT THE END WITH NORMAL TREE PART]
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 8
WATERFALL CHART POSITIVE AND NEGATIVE VALUES SHOW [UP AND DOWN VALUES SHOW]
LEGEND AND
DETAILS IN PIE,
DONUT LEGEND [MAIN CATEGORY], DETAILS [SUBCATEGORY]
GROUP, DETAILS IN TREE MAP GROUP [MAIN CATEGORY], DETAILS [SUB CATEGORY]
GROUP ONLY
SECTION IN
FUNNEL MAIN CATEGORY
MAP VISUALS
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 9
How many bars system will generate if main category having 3 values and child category having
4 values?
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 10
c) Number of visuals
Tooltip: On
Q & A: On
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 11
Page Size:
Type (16:9)
Page Background:
Transparency: 75%
Wall Paper:
Color: Pink
Transparency: 60%
Note: If you put wall paper transparency to 80-90%, then you can see the back ground color
1. Click Image from Home ribbon, specify image and specify scaling (fit)
2. Click Textbox from Home ribbon and specify the above text
3. Click oval from home ribbon and shapes section. Specify Fill Off
4. Click Textbox from Home ribbon and specify the above text and place on Oval
f) Allow you operations on column wise and support conditional columns and calculated
columns adding
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 12
Format section:
b) Grid:
Text size: 12
c) Column headers:
d) Values
e) Totals
On, Size: 14, Text Color (Yellow), Outline (top + bottom), and Color (light blue)
f) Title
g) Tooltip:
f) Visual Headers:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 13
Border: Black
And Observe
Slicers
What is Slicer?
Slicer in Power BI Desktop to filter the results of visuals on your report page. And with slicers,
you can easily adjust the filter that's applied by interacting with the slicer itself.
There are slicer options for how your slicer appears, and how you interact with it.
The following image shows a slicer, with its type drop-down visible.
• List
• Dropdown
• Between
You can add a slicer to a report by clicking on the slicer visual in the Visualizations pane.
Based on the column data type the above slicer options displayed.
Slicers behave similarly in both Power BI Desktop and the Power BI service.
• Display commonly-used or important filters on the report canvas for easier access.
• Make it easier to see the current filtered state without having to open a drop-down list.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 14
• Filter by columns that are unneeded and hidden in the data tables.
• Create more focused reports by putting slicers next to important visuals.
No
Not possible
No
What kind of slicer options you will find when you work with string, dates, and numeric?
Slicer (Coursemode):
Field: ModeID
Format:
b) Slicer Header: Font Color (Blue), Size: 14, Background (Light red), Font (Arial Black)
c) Items: Font Color (Violet), Size: 12, Background (White), Font (Arial Black)
d) Title: On, Text (Choose products), Font Color (Yellow), Background color (Blue), Size: 14
e) Border (ON)
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 15
Slicer (Year):
SSRS
a)SSRS Maps constructed using geo spatial coordinates [Sql Server Spatial data type stores
this].
POWERR BI MAPS
Many types of maps, but Power BI in built visuals are Map and Filled Map.
a)Map Visual
g)Shape Map
a) Address columns [Ex: Country, State, City etc...] : Filled Map, Map Visual
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 16
Example:
Power BI Desktop showed the data on the map visualization based on address, suburb, city,
state, and country. Fortunately Bing Map helps a lot to search the point on the map based on
address fields. However sometimes you don’t have address fields, actually in some types of the
data there is no address field. As an example an earth quake most of the time happens
somewhere deep in the ocean where there is no street address! All you have is latitude and
longitude as the Geo graphical data. However latitude and longitude is precise enough for any
GPS device to point out the exact location
Power BI Desktop includes a map chart and a filled map chart. These charts enable you to
visually map your data, both regionally and globally. Power BI integrates with Bing maps to find
default coordinates for locations, based on a string value, in a process known as geo-coding.
This integration means you do not need to provide longitude and latitude coordinates in your
data—this is optional, because Bing makes a best guess at the location.
Filled Map
a)Filled Map is a map that shows data points as Geo-spatial areas rather than points on map.
c)Working with Filled Map however isn’t as easy and convenient as the map chart is.
d)You need to set the data category of fields in the data model appropriately to get the Filled
Map working correctly.
e)There are also some limitations in filled map with countries that address hierarchy is different
from State, City, and Country.
Additional Information:
The filled map chart (also known as a choropleth) uses a slightly different visualization to
represent the data. This chart uses shading, tinting, or patterns to represent the data value
across a geographic area.
The darker the color, the higher the value; the lighter the color, the smaller the value. This is
particularly useful for presenting socioeconomic or demographic data, because it provides a
visual overview of data across a wide area, such as all the states in the United States.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 17
Use Locationname column from Locations table, size: taxamount, and observe map.
Other scenarios:
Sc1: Use LocationID column from FactPayments table, and observe map.
Sc2: Use Countryname column from FactPayments table, and observe map.
Sc3: Use Statename column from FactPayments table, and observe map.
Use Locationname column from Locations table, size: taxamount, and observe map.
Map Chart
The map chart accepts data for the Legend, Longitude, Latitude, Values, and Color saturation.
The Legend property accepts fields such as City, County, and Province, and the Values property
accepts
Numeric values such as Total Sales, or Number of Customers. The numeric values are presented
as colored bubbles on the applicable location specified in the Legend property. The bubbles are
sized proportionally to the data they represent within the field in the dataset; that is, the bigger
the value, the bigger and the bubble.
The map chart is useful for presenting data based on cities, rather than wide areas.
Shape Map
Create a Shape Map visual to compare regions on a map using color. Unlike
the Map visual, Shape Map can't show precise geographical locations of data points on a map.
Instead, its main purpose is to show relative comparisons of regions on a map by coloring them
differently.
Shape Map visuals are based on ESRI/TopoJSON maps, which have the compelling ability to
use custom maps that you can create. Examples of custom maps are: geographical, seating
arrangements, floor plans, and others. The ability to use custom maps is not available in this
Preview release of Shape Map.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 18
You can use custom maps with Shape Map as long as they are in the TopoJSON format. If your
map is in another format, you can use online tools such as Map Shaper to convert
your shapefiles or your GeoJSON maps into the TopoJSON format.
To use your TopoJSON map file, add a ShapeMap visual to your report and add some data to
the Location and Color saturation buckets. Then, in the Visualizations pane with
the Format section selected (shown as (1) in the following image), expand the Shape section
and select + Add Map.
Note: The Shape Map visual will plot up to a maximum of 1,000 data points.
Practical:
a) Verify shape map in the visuals section, if it is not available you need to enable it in Options
section of Power BI Desktop.
c)Drag and drop Shape map on the report canvas, and specify like below
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 19
2. Highest discount fee district with dark blue, low discount fee with light blue.
Filled Map:
Data Color:
Map Controls:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 20
Auto Zoom: On
Line Chart:
Axis: InstituteID
Legend: TaxAmount
Values:DiscountFee
Legend: Position (Right), Title (On), Color (Grey), Legend Name: Discount Band
Font Family (Segoe UI), Text Size (8), Style (Markers only), Match Line Color (On), Circle Default
Icon (On)
X-Axis: Type (Categorical),Color (Grey), Text size (11), Font Family (Segoe UI),Minimum Category
Width (20),Max Size(25%), Inner Padding (20%), Concatenate Labels (On) Title (Off)
Y-Axis (Column): Position (Left), Scale Type (Linear), Start (Auto), End (Auto), Color (Grey), Text
Size (11), Font Family (Segoe UI), Display units (Auto), Gridlines (On), Color (White), Stroke width
(1), Line Style (Solid), Show secondary (On)
Shape: Stroke Width (2), Join Type (Round), Line Style (Solid)
Title: Title Text (Discount), Font Color (#C8C8C8), Background color (#5F6B6D), Alignment (Left),
Text Size (9), Font Family (Segoe UI) Tooltip: Type (Report Page) Page (Auto)
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 21
a) Cross Tab Reporting [Rows vs. Columns, Values display and analysis]
b) Help you with Row drill down / Drill Up and column Drill Down/ Drill up analysis.
c) It has additional options than table [Ex: Column totals, Row totals etc...]
Practical:
Scenario1:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 22
Scenario2:
Click one level freeze and click on any value to see respective Courses of InstituteID
Note: Visual added with row Drill Down options in this situation
Scenario3:
Observe the visual with Row and Column drop down list and drill down options
Click Row Level, One level Drill down and see the result
Click Row level, One Level Drill up and come to the original position
Click Row Level, Full drill down and see the result
Click Column Level, Full Drill Down and see the result
Right click MSBI Tech--> Exclude [To exclude this in the analysis]
Click Column Level, One level Drill Up and see the result
Click Row Level, One level Drill Up and see the result
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 23
Right click PowerBI Tech--> Include [To include this in the analysis]
Click Column Level, One level Drill Up and see the result
Click Row Level, One level Drill Up and see the result
A Pie Chart is a circular chart divided into sectors which displays data, information, and statistics
in an easy to read 'pie-slice' format with varying slice sizes.
Features
a) Pie and donut charts have similar functionality, except that the donut chart has a hollow
center.
Legend: Drag the column that you want to display as the legend.
Details: Please specify the Column name on which you want to partition you Pie Chart. Values
will split based on this field.
Values: Any Numeric value such as sales amount, Total Sales, Customer count etc.
For example, you could add Sales Person for the Legend value, and Sales YTD to Values.
The pie or donut chart is divided into portions that are sized to represent the value.
Legend: InstituteID
Values: DiscountFee
Observe
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 24
SC2:
Legend: InstituteID
Details: ModeID
Values: DiscountFee
Detail labels:
Position: Inside
Observe
Donut Chart
a) A doughnut chart is similar to a pie chart in that it shows the relationship of parts to a whole.
b) The only difference is that the center is blank and allows space for a label or icon.
Legend: ModeID
Values: DiscountFee
Scenario 2:
Legend:ModeID
Values: LastYearDiscountFee
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 25
What are the extra format options you will find in Donut than Pie?
Filled Map:
Data Color:
Map Controls:
Auto Zoom: On
Inner radius -->more--> in that radius you can specify some other visuals textboxes or any...by
using bring forward and send backward
FILTERS at page1
VISUAL FILTER
Take Visual Level Filter for Table Visual: --> Advanced Filter--> ModeID Doesn't contain
→Customized
PAGE FILTER
Take Page Level Filter: Drag and drop CourseID from field’s part--> CourseID does not contain
→INFORMATIC-F or INFORMATICA-C
DUPLICATE PAGE
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 26
Take Page Level Filter: Drag and drop CourseID from field’s part--> CourseID does not contain
→TERADATA-F or TERADATA-C
REPORT FILTER
Take Report Level Filter: Drag and Drop Year from DimDate Fields-->Year Basic Filter→2018 and
2019
Drill through Filter and Back button action:
a) In the above Matrix Visual in Page2, go to Matrix Visual
Visual Tab-->Drill through--> Drag and Drop InstituteID
b) Go to Page 1--> Any Visual (Take Table Visual) --> Go to InstituteID Field Any Value--> Right
Click--> Drill through--> Page2
c) Now Page2 Matrix Visual shows the respective InstituteID Information
d) Click Control + Enter key on Back Button, to go back to Page1
In Power BI Desktop you can synchronize slicers across multiple report pages. To synchronize
slicers, in the View pane in the ribbon, select Sync slicers
If there is a filtering in one page, the same would affect in other pages which are in sync.
a) You can apply multiple slicers to various pages and use the pane to define how each slicer is
individually applied across the various pages in your report.
b) While your selection of slicers can be synchronized, other selections such as styling, editing,
and deleting are not synchronized.
While your selection of slicers can be synchronized, other selections such as styling, editing, and
deleting are not synchronized.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 27
If you make a selection in a slicer and then apply a filter that would normally remove the
selected item, it remains at the bottom of the list of items in the slicer. If the filter is removed,
the selection is still there in the slicer. You'll notice that if you unselect the item from the slicer it
disappears from the list.
You can also apply a group name to a collection of slicers in the Advanced options section of
the Sync slicers pane, and have slicers that share the same group be synchronized across
pages.
This feature lets you create a custom group of slicers to keep synchronized. A default name is
provided, but you can use any name you prefer.
The group name provides additional flexibility with slicers. You can create separate groups to
sync slicers that use the same field, or put slicers that use different fields into the same group.
Scenario 1:
Highlight ModeID Slicer-->View Menu-->Tick mark Sync Slicer--> Specify pages [Page1,
Page2], selection [Visible for page1 and page2]
Change filter value in Page1 and verify at page2, data displayed based on that new filter.
Scenario 2:
Highlight Year Slicer-->View Menu-->Tick mark Sync Slicer--> Specify pages [Page1,Page3],
selection [Visible for page1 only, hide in page3]
Change filter from 2017 to 2019 in Page1, verify at page3 data display based on the year 2019
but filter is not visible.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 28
Book Marks:
Book mark capture the currently configured view of a report page, including filtering and the
state of visuals.
a) Using bookmarks in Power BI help you capture the currently configured view of a report
page, including filtering and the state of visuals, and later let you go back to that state by simply
selecting the saved bookmark.
b) You can also create a collection of bookmarks, arrange them in the order you want, and
subsequently step through each bookmark in a presentation to highlight a series of insights, or
the story you want to tell with your visuals and reports.
a) Go to page1--> Click Add to Book Mark--> Rename the Book Mark to Initial Page
b) Go to Any page / Any Visual (Ex: page 2 Table visual)--> Focus Mode--> Click Add to Book
Mark--> Rename it
c) Go to Any page / Any Visual (Ex: page 2 Table visual)--> Focus Mode--> Click Add to Book
Mark--> Rename it
Note: Prepare as many as possible for your better understanding and storytelling.
d) Click view of Book Marks, it will show you all the book marks in Presentation format (similar
to Power Point).
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 29
Note:
a) Publish and observe Selections and Book Marks in the Power Bi Service.
Two types
Click Book Marks--> Find your book marks under Report Book Marks.
b) Go to Any page / Any Visual (Ex: page 2 Table visual)--> Focus Mode--> Click Add to
Personal Book Mark--> Rename it
Yes
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 30
Different hours there are different types of reporting data, I want 4 granularities of a day
analytical data [6am, 11am, 4PM, and 8PM]
Take different Bookmarks in those grains and generate a presentation, export that in PDF format
[Excel format]
Visual Interactions:
Based on one visual values change, how do you want to take that affect in other visuals.
c) Highlighting: This visual highlight those rows and keep the remaining rows in dimmed.
Practical:
a) Select Year Slicer, Format--> Tick Mark drilling filters other visuals
Now automatically filter, none and highlighted added to other visuals in the same page.
d) Change year in the slicer, there is no effect to the first visual, second visual filtered and third
visual highlighted.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 31
b)Year Over Year Growth Percent = (Current year -Previous year / Previous Year )* 100
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 32
d)Year Over Year Growth % = DIVIDE([Year Over Year Growth], Previous Year DiscountFee) * 100
e) Count of students = COUNT (FactPayments[StudentID])
f) Month_ToDay_Fee =
CALCULATE(SUM(FactPayments[Discount_Fee]),DATESMTD(DimDate[Date]))
g) Quarter_ToDay_Fee =
CALCULATE(SUM(FactPayments[Discount_Fee]),DATESQTD(DimDate[Date]))
h) Year_ToDay_Fee =
CALCULATE(SUM(FactPayments[Discount_Fee]),DATESYTD(DimDate[Date]))
i) PriorMonth_ToDay_Fee =
CALCULATE(SUM(FactPayments[Discount_Fee]),DATEADD(DATESMTD(DimDate[Date]),-1, YEAR))
j) PriorQuarter_ToDay_Fee =
CALCULATE(SUM(FactPayments[Discount_Fee]),DATEADD(DATESQTD(DimDate[Date]),-1,YEAR))
k) PriorYear_ToDay_Fee =
CALCULATE(SUM(FactPayments[Discount_Fee]),DATEADD(DATESYTD(DimDate[Date]),-1,YEAR))
l) Twoyearssameperiod =
CALCULATE(sum(FactPayments[Discount_Fee]),SAMEPERIODLASTYEAR(SAMEPERIODLASTYEAR(DimDate
[Date]))
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 33
Scatter Chart
Details: InstituteID
Legend: LocID
X-Axis: Discount_Fee
Y-Axis: Actual_Fee
Size: TaxAmount
Play Axis: Year
Testing:
WaterFall Chart
Category: Period [keep only month]
Breakdown: Year
Y- Axis: NetPaymentFlow
Understanding:
a) Wherever Green available, positive values, Red available negative values.
b) Bars depending on the value [more value big bar, normal value small bar]
s
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 34
What are the differences between Table, Matrix and Multi Row Card?
Table Matrix Multi Row Card
1)Column by column data 1)Two textual sections compare 1)Rows may contain
presentation [Columnar against a numerical value [Cross Tab normal or aggregate
Reporting reporting object] values
Object] 2) Aggregates displayed in the last 2) No separate
row or last column [row aggregate aggregation row in
2) Aggregated data always
and column aggregate] the down or right.
presented in the last row
Charts and graphs will enable you to create storylines, trends, charts, and high-level
results and many other easy understandable reports.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 35
Data Charts
a) Row chart
a) Column chart
a) Row chart
a) Column chart
While you have created your dashboard and are off to a good start, it is equally important to
learn which type of chart will be most suitable for which kind of data. If not properly considered,
data visualization can become misleading. Here are some strategies to keep in mind: There are
four general classifications of charts based on their functionality:
a) Distribution
b) Composition
c) Comparison
d) Relationship
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 36
PieCharts
Pie charts are best used to show composition in percentages. Make sure that all values add up
to hundred.
Stacked Charts
Scatter plot
Scatter plots are the best at showing a relationship between two variables. For instance, you
may wish to see how number of years worked in the organization varies by salary for an
employee.
Bar charts and column charts are mostly used for distribution and comparison. You can display
the salary range versus a number of employees on a bar chart. This can show comparison
among different ranges of salary. They can also be used to show periodic data.
Line charts and area charts are used for comparison. They are the most suitable for viewing time
series data. For instance, if you wish to see how the salary of an employee has grown over the
last 10 years, a line chart will give you the best visual representation.
Mixed Charts
Column or Bar chart can be easily used for showing a single measure’s insight across a category.
Mixed charts such as Line and Column chart can be used for showing two measure and
comparing their values across a set of categories.
However there are some charts that can be used to show values of three measures, such as
Scatter Chart. Scatter chart not only shows values of three measure across different categories, it
also has a special Play axis that helps you to tell the story behind the data.
Scatter chart is a built-in chart in Power BI that you can show up to three measure with a
categorization in it. Three measures can be visualized in position of X axis, Y axis, and size of
bubbles for scatter chart. You can also set up a date field in play axis, and then scatter chart will
animate how measure values are compared to each other in each point of a time. Let’s start
building something simple with this chart and see how it is working in action.
Power BI like other visualization tools has the line chart visualization which is good for showing
one or two measure’s value across an axis which can be a category, time period and etc.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 37
Recently Power BI line chart added the feature to create dynamic reference lines and the
Analytics pane which brings more power into this useful chart.
LINE CHART
Line chart is one of the most basic charts that you can see in every visualization tool. Power BI like other
visualization tools has the line chart visualization which is good for showing one or two measure’s value across an
axis which can be a category, time period and etc. Recently Power BI line chart added the feature to create dynamic
reference lines and the Analytics pane which brings more power into this useful chart.
Value Line
Line chart can show one or more measures as measures, such as Sales Amount, Total Costs,
Quantity of the goods sold and etc.
Trend Line
Depends on the variety of values across a time period, Line chart can illustrate a straight line as
a trend. This trend is good to understand how in overall products are selling, is revenue going
up or down for example.
Reference Line
You might want to define minimum, maximum, average, or median values for your line chart as
separate lines, and compare values lines with these lines. These are reference lines which can be
dynamically created based on value of measures in the chart.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 38
Analytics Tab
In Line chart (and few other charts) there is an Analytics tab that brings the power of adding
extra insight, named Analytics Tab. In line chart we can have the extra insight as Trend Line,
Constant Line(s), and Dynamic Reference Line(s). You have seen already how helpful a trend line
is next other lines are reference lines which can be useful to measure values in line chart and
compare them to a reference value. Let’s dig more into it now.
Constant Line
A constant line is a constant value showed as a line. It is good for comparing the value line to
a constant line. Here I have created a constant line for value $250000 and did some
formatting for that and made it dotted.
This is good to compare values with especially when we DO NOT want to drill down or up. The
reason for that is that If I drill up one level, then because I am in quarter level most of values
goes above this constant value. So normally constant line used when you have the main value
as the Average, rather than sum or count.
Dynamic Reference Lines
Constant line as you see above are not good when we drill down or up, because their value
might not be close to compare with the value lines in that level. So dynamic reference lines
are the substitute for such case. For example you can create an An average reference line,
minimum, or maximum which works based on the level you are in, or filter applied, or what
other slicers selected. This would be based on what data is showed in the value line. There are
number of dynamic reference lines that you can create; Min, Max, Average, Median, and
Percentile.
Percentile Line
You can simply add a percentage line, based on the percentage number you want. This can be
percentage of one of measures viewed in the line chart.
Min, Max, Average, Median Lines
For adding any of these lines, just click add, set the formatting, name the line as something
and then choose to show data labels with name and values or without It.
Do Not Overuse
Line Chart is a simple chart and there is a reason for this simplicity, to figure out values, trends,
and analyze it with a quick glance. Adding more lines to it will add more insight obviously, but
overusing it with adding all possible reference lines, trend lines, and multiple constant lines will
make it a very busy line chart which then doesn’t convey the message as it should. Consider
using this visualization in the best way, get benefit of reference and trend lines, but only when it
adds value.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 39
Waterfall Chart
Waterfall chart is for analysis of up and downs for an additive measure. As an example you can
analysis cashflow based on up and downs of it through all months of a financial year.
You can also use waterfall chart for analysis of inventory, credit, performance, and everything
else that falling or raising of its value matters, sequential of attribute that describe the value is
also another helpful dimension of the waterfall chart. For example you want to know up and
downs of performance through the last year with the sequence of quarters that you’ve done
performance reviews.
MAPS in POWER BI
There are many ways to visualize something on Map in Power BI, some of it are as below;
• Map Visual
• Filled Map Visual
• Custom Visuals – Synoptic Panel by OKviz
• Custom Visuals – GlobeMap by Microsoft
• Shape Map Visual – Preview
ArcGIS Map Visual – Preview
Shape Map
•
• Shape Map is a visual first introduced few months ago with the ability to highlight
regions (similar to Filled Map), and the power of adding your own map file to it. This
feature makes it different from Filled Map, because the normal filled map visualize
anything on a Bing map layer, and if for some reason it can’t find that geo location
information result won’t be great with that.
• You need to enable it in Options section of Power BI Desktop; From File Menu ->
Options and Settings -> Options.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 40
Power BI utilizes two built-in map charts; Map and Filled Map. Filled Map is a map that shows
data points as Geo-spatial areas rather than points on map. Areas can be continent, country,
region, state, city, or county. Working with Filled Map however isn’t as easy and convenient as
the map chart is. You need to set the data category of fields in the data model appropriately to
get the Filled Map working correctly. There are also some limitations in filled map with countries
that address hierarchy is different from State, City, and Country. In this post I’ll get you through
some tips of using filled map in your Power BI solution. I also show you some existing issues in
the current version of filled map and things that you need to be aware of when you work with
this visualization element.
Map Reports
SSRS→ Maps constructed using geo spatial coordinates [Sql Server Spatial data type stores
this]. Address columns are not used for maps.
Power BI→ Multiple types of maps [Area map, filled map, Tree Map etc…]
Maps constructed using
a) Address columns
b) Longitude and latitude
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 41
longitude as the Geo graphical data. However latitude and longitude is precise enough for any
GPS device to point out the exact location
Gauge reporting
If you want to show one value in range then go for gauge.
It takes importantly
a) Min value
b) Max value
c) Value field
d) Target value
b) Radial [Ex: Bus or car Speedo meter, BP machines] : Less Space [in 360 / 180 degrees]
It takes importantly
a) Min value
b) Max value
d) Target value
a) Minvalue: 100000
b) TargetValue: 1000000
Value: DiscountFee
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 42
Note: Gauge starts with minimum value and shows that the target point, the current value
position in the gauge. Gauge ends with maximum value.
What is KPI?
Key Performance Indicator is a measure for business to understand how they perform in specific
area that is important and many times critical for their business. For example they would like to
see how the current year to date sales is going against what they estimated? Is it higher or
lower? What is the trend? Is it going upward or downward? There are some visualization options
to show KPIs, and from them the most commons
Are: Gauges, Charts with arrows that shows upward or downward, and color code of red,
amber, or green (visualizing the status).
Key Performance Indicators enable companies to measure their progress towards a business
objective, or goal. KPIs can be created at a high level to measure the overall performance of the
company, in addition to being set at lower levels, such as by departments—for example, sales,
call center, or warehouse. You can add a KPI visual to your report in Power BI to track progress
towards a target. Similar to the card
visual, the KPI displays a single value such as TotalSales for the current year—this is the
Indicator. The Target value is the goal, such as TargetSales. Add a data value such as Year to the
Trend axis to display how well the target is being met. This is represented as a filled line chart,
and Power BI automatically colors the filled area using green, yellow, or red to show if progress
is good, neutral, or bad. These colors can be changed using the Format options.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 43
KPI Elements
KPIs measuring something and show trend and status. So they have components to work
with as below:
• Value; The main measure which we want to evaluate
• Target; What we want to compare the Value with
• Trend; How Value performs in a time period, is it going upward, downward…?
• Status: What is the current status of Value against Target?
Scenario1:
Indicator: DisCountFee
TrendAxis: TaxAmount
TargetValue: ActualFee
Image understanding:
Take minimum value, based on that initial point started, if minimum value equals to the initial
point, it starts at beginning level.
If minimum value more than initial point, then it starts at one small level up [based on minimum
value show].
Scenario2:
Indicator: DisCountFee
TrendAxis: Year
TargetValue: ActualFee
Scenario3:
Indicator: DisCountFee
TrendAxis: Month
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 44
TargetValue: ActualFee
Slicers
There are two types of slicers a) General Slicer [Page Level] b) Sync Slicer [Across Pages]
Practical:
Drag and drop the below fields
InstituteID
LocationID
Total DiscountFee Current Year measure
Total DiscountFee Last Year measure
Note:
If we take only one textual column, it will show aggregates for the values by categorizing one textual
column.
If we add one more textual column, then it will show aggregates by categorizing both the textual
columns.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
IT Real-Time training that work for your career.
PROVIDED TRAINING FOR THOUSANDS OF STUDENTS .
SUBJECT, MATERIAL & VIDEOS
Trainings:
CLASS ROOM
VIDEOS ONLINE
PROVIDED
FAST TRACK
ONE ON ONE
PROJECT TRAINING
Address:
Flat No: 506/B
Nilgiri Block
Aditya Enclave
Mytrivanam Area
ARCGIS MAPS Hyderabad.
Contact Information
+91 9573168449
040 66638869
ArcGIS visuals can be created and viewed in both Power BI Desktop and the Power BI
service.
a)The combination of ArcGIS maps and Power BI takes mapping beyond the presentation of
points on a map to a whole new level.
b)Choose from base maps, location types, themes, symbol styles, and reference layers to create
gorgeous informative map visualizations.
c)The combination of authoritative data layers on a map with spatial analysis conveys a deeper
understanding of the data in your visualization.
d)While you cannot create an ArcGIS maps on a mobile device, you can view and interact with it.
What is GIS?
The example below uses a dark gray canvas to show regional sales as a heatmap against a
demographic layer of 2016 median disposable income. As you'll see as you read on, using
ArcGIS maps offers almost limitless enhanced mapping capability, demographic data, and even-
more compelling map visualizations so you can tell your best story.
User consent
ArcGIS Maps for Power BI is provided by Esri (www.esri.com). Your use of ArcGIS Maps for
Power BI is subject by Esri's terms and privacy policy. Power BI users wishing to use the ArcGIS
Maps for Power BI visuals, need to accept the consent dialog.
PRACTICAL:
Step 2: Select the ArcGIS Maps for Power BI icon from the Visualizations pane.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 2
From the Fields pane, drag a data field to the Location or Latitude and/or Longitude buckets.
In this example we're using Store > City.
Step 4: From the Fields pane, drag a measure to the Size bucket to adjust how the data is
shown. In this example we're using Sales > Last Year Sales.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 3
1. Access additional features by selecting the ellipsis in the upper right corner of the
visualization and choosing Edit.
The available features display across the top of the visualization. Each feature, when
selected, opens a task pane that provides detailed options.
Features overview
Four base maps are provided: Dark Gray Canvas, Light Gray Canvas, OpenStreetMap, and
Streets. Streets is ArcGIS's standard base map.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 4
ArgGIS Maps for Power BI automatically detects the best way to show data on the map. It
selects from Points or Boundaries. The Location type options allow you to fine tune these
selections.
Boundaries will only work if your data contains standard geographic values. Esri automatically
figures out the shape to show on the map. Standard geographic values include countries,
provinces, zip codes, etc. But just like with GeoCoding, Power BI may not detect the field should
be a boundary by default, or it may not have a boundary for your data.
Four map themes are provided. Location Only and Size themes are automatically chosen based
on the fields you bind to the location and added to the Size bucket in the Power BI Fields pane.
We're currently using Size, so let's change to Heat map, just remember to disable Heat
map before moving on to the next step.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 5
Theme Description
Location Plots data points or filled boundaries on the map based on the settings in Location
Only Type.
Size Plots data points on the map based that are sized based on the value in the size
bucket in the fields pane.
Symbol styles enable you to fine tune how data is presented on the map. Symbol styles are
context sensitive based on the selected Location type and Map theme. The example below
shows Map type set to Size and several adjustments to transparency, style and size.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 6
3. Power BI adds a pin to that location and you can change the color of the pin.
4. Add and delete pins.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 7
The Drive time pane lets you select a location and then determine what other map features are
within a specified radius or driving time.
1. Select the Drive time tab and choose the single or multi select tool. Single select the pin
for Washington D.C.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 8
Tip
It's easier to select a location if you zoom in on the map (using the + icon).
2. Let's say you're flying into Washington D.C. for a few days and want to figure out which
stores are within a reasonable driving distance. Change Search area to Radius and
Distance to 50 miles and select OK.
3. The radius is shown in purple. Select any location to display its details. Optionally, format
the radius by changing color and outline.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 9
ArcGIS Maps for Power BI provides a selection of demographic layers that help contextualize
data from Power BI.
3. Each layer is interactive as well. Just as you can hover over a bubble to see the details, you
can click a shaded area on the map to see the details.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 10
ArcGIS Online provides the ability for organizations to publish public web maps. Additionally,
Esri provides a curated set of web maps through Living Atlas. In the ArcGIS tab, you can search
all public web maps or Living Atlas maps, and add them to the map as reference layers.
3. To see the details, select a shaded area to open the Select from reference layer: Use the
reference layer selection tool to selection boundaries or objects on the reference layer.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 11
ArcGIS Maps for Power BI allows five selection modes to help you select your data accurately
and quickly.
Change the selection mode by hovering your cursor over the single selection tool icon shown in
the below image. This will also expand the hidden bar to show additional tools:
Each tool has a unique role in allowing you to select your data:
b)Draws a rectangle on the map and selects the contained data points.
e)Allows you to select data points that are similar to each other.
Note
Step 15: Managing use of ArcGIS Maps for Power BI within your organization
Power BI provides the ability for users, tenant administrators, and IT administrators to manage
whether to use ArcGIS Maps for Power BI. Below you will find steps each role can take to
manage the use of ArcGis Maps.
In Power BI Desktop, users can stop using ArcGIS Maps for Power BI by disabling it on the
security tab in File > Options and settings and then select Options > Security. When disabled,
ArcGIS Maps will not load by default.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 12
In PowerBI.com, tenant administrators can prevent all tenant users from using ArcGIS Maps for
Power BI by disabling the option from Settings > Admin Portal > Tenant settings. When this
happens, Power BI will no longer see the ArcGIS Maps for Power BI icon in the visualizations
pane.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 13
Power BI Desktop supports using Group Policy to disable ArcGIS Maps for Power BI across an
organization's deployed computers.
Attribute Value
valueName EnableArcGISMaps
ArcGIS Maps for Power BI is available in the following services and applications:
Service/App Availability
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 14
Power BI Embedded No
In services or applications where ArcGIS Maps for Power BI is not available, the visualization will
show as an empty visual with the Power BI logo.
When geocoding street addresses, only the first 1500 addresses are geocoded. Geocoding place
names or countries is not subject to the 1500 address limit.
How do ArcGIS Maps for Power BI work together? ArcGIS Maps for Power BI is provided by
Esri (www.esri.com). Your use of ArcGIS Maps for Power BI is subject by Esri's terms and privacy
policy.
Is there any charge for using ArcGIS Maps for Power BI?
The ArcGIS Map for Power BI is available to all Power BI users at no additional cost. It is a
component provided by Esri and your use is subject to the terms and privacy policy provided
by Esri as noted earlier in this article.
I'm getting an error message in Power BI Desktop about my cache being full
This is a bug that is being addressed. In the meantime, to clear your cache, please try to delete
files at this location: C:\Users\AppData\Local\Microsoft\Power BI Desktop\CEF and then restart
Power BI.
ArcGIS Maps for Power BI automatically detects standard boundaries like countries/regions,
states/provinces, and zip/postal codes. If you need to provide your own shapes you can do so
using the Shape Maps for Power BI Desktop (Preview).
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 15
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
IT Real-Time training that work for your career.
PROVIDED TRAINING FOR THOUSANDS OF STUDENTS .
SUBJECT, MATERIAL & VIDEOS
Trainings:
CLASS ROOM
VIDEOS ONLINE
PROVIDED
FAST TRACK
ONE ON ONE
PROJECT TRAINING
Address:
Flat No: 506/B
Nilgiri Block
Aditya Enclave
R Language
Mytrivanam Area
Python Language and Visuals
Custom Visuals
Hyderabad.
Contact Information
+91 9573168449
040 66638869
What is R?
R is a programming language and free software environment for statistical computing and graphics
that is supported by the R Foundation for Statistical Computing. The R language is widely used
among statisticians and data miners for developing statistical software and data analysis.
R was created by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand,
and is currently developed by the R Development Core Team, of which Chambers is a member.
Interfaces
The most commonly used graphical integrated development environment for R is RStudio. A similar
development interface is R Tools for Visual Studio. Interfaces with more of a point-and-click
approach include Rattle GUI, R Commander, and RKWard.
Some of the more common editors with varying levels of support for R include Eclipse,Emacs (Emacs
Speaks Statistics), Kate, LyX,Notepad++,Visual Studio Code, WinEdt, and Tinn-R.
R functionality is accessible from several scripting languages such as Python,Perl,Ruby, F#,and Julia.
Interfaces to other, high-level programming languages, like Javaand .NET C#are available as well.
Installation of RStudio:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 2
[1] 178.9667
> lm_1 <- lm(y ~ x) # Fit a linear regression model "y = B0 + (B1 * x)"
# store the results as lm_1
> print(lm_1) # Print the model from the (linear model object) lm_1
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
-9.333 7.000
Residuals:
1 2 3 4 5 6
3.3333 -0.6667 -2.6667 -2.6667 -0.6667 3.3333
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -9.3333 2.8441 -3.282 0.030453 *
x 7.0000 0.7303 9.585 0.000662 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.055 on 4 degrees of freedom
Multiple R-squared: 0.9583, Adjusted R-squared: 0.9478
F-statistic: 91.88 on 1 and 4 DF, p-value: 0.000662
Creating a function
sumofsquares <- function(x){ # a user-created function
return(sum(x^2)) # return the sum of squares of the elements of vector x
}
Calling a function
sumofsquares(1:3)
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 3
R Visual in Power BI
Practical 1:
1. Drag and drop R visual, take Date and Discount_Fee data in the fields of R visual
2. Write the below R command and click run icon
plot(dataset$Discount_Fee)
x<-rnorm(100)
plot(x)
It now will show you 100 values statistical plot
Practical 2:
Download ggplot2 library
1.Open RGUI from all programs and go to Packages menu and click install packages or
install by using below.
> install.packages("ggplot2", lib="/data/Rpackages/")
> library(ggplot2, lib.loc="/data/Rpackages/")
2.library(ggplot2)
qplot(carat,data=diamonds,geom="histogram",fill=color)
if you don't have libraries, then down load and install R packages.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 4
4. Scatter plot
library(ggplot2)
qplot(Sepal.Length,Petal.Length,data=iris,color=Species)
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 5
What is Python?
ou can run Python scripts directly in Power BI Desktop, and import the resulting datasets
into a Power BI Desktop data model.
Install Python
• To run Python scripts in Power BI Desktop, you need to install Python on your local
machine. You can download and install Python for free from many locations, including
the Official Python download page, and the Anaconda. The current release of Python
scripting in Power BI Desktop supports Unicode characters as well as spaces (empty
characters) in the installation path.
The Power BI Python integration requires two Python packages to be installed (Pandas
and Matplotlib). Using the pip command line tool, install the following two packages,
With just a few steps in Power BI Desktop, you can run Python scripts and create a data
model, from which you can create reports, and share them on the Power BI service.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 6
To run a Python script in Power BI Desktop, create the script in your local Python
development environment, and make sure it runs successfully.
To run the script in Power BI Desktop, make sure the script runs successfully in a new and
unmodified workspace. This means that all packages and dependencies must be
explicitly loaded and run.
When preparing and running a Python script in Power BI Desktop, there are a few
limitations:
• Only Pandas data frames are imported, so make sure the data you want to import to
Power BI is represented in a data frame
• Any Python script that runs longer than 30 minutes times out
• Interactive calls in the Python script, such as waiting for user input, halts the script’s
execution
• When setting the working directory within the Python script, you must define a full path
to the working directory, rather than a relative path
• Nested tables (table of tables) are currently not supported
1. In Power BI Desktop, the Python Script data connector is found in Get Data. To run your
Python Script, select Get Data > More..., then select Other > Python script as shown in
the following image:
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 7
2. If Python is installed on your local machine, the latest installed version is selected as
your Python engine. Simply copy your script into the script window and select OK.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 8
3. If Python is not installed, is not identified, or if there are multiple installations on your
local machine, warning will be displayed.
Python installation settings are centrally located in the Python Scripting section of the
Options dialog. To specify your Python installation settings, select File > Options and
settings and then Options > Python scripting. If multiple installations of Python are
available, a drop-down menu appears that allows you to select which installation to
use. You can also select Other and give custom path.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 9
4. Select OK to run the Python Script. When the script runs successfully, you can then
choose the resulting data frames to add to the Power BI model.
Refresh
You can refresh a Python script in Power BI Desktop. When you refresh a Python script,
Power BI Desktop runs the Python script again in the Power BI Desktop environment.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 10
What is pandas?
During installation tick mark, add to environment variables (or else you need to add
manually)
Party= pandas.read_csv(“c://data/party_src.csv”)
Matplotlib is a python library used to create 2D graphs and plots by using pythonscripts.
It has a module named pyplot which makes things easy for plotting by providing
feature to control line styles, font properties, formatting axes etc.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 11
a)Drag and drop python visual, specify a column [Ex: Discount Fee] for the values section
b)Write the below script in script editor area and press run
import matplotlib
import numpy as ny
lx=ny.linspace(0,3*4,500)
pplot.plot(lx,ny.sin(lx**2))
pplot.title('vinaytech plot')
pplot.show()
import win32api
win32api.MessageBox(0,'Visual RenderedSuccessfully','Title')
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 12
CUSTOM VISUALS
Practical:
Drag and drop Hierarchy Slicer, take year, quarter, and months in the fields
section. Observe the slicer drill down option between year, quarter and
month.
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
DATA MODELING FOR MSBI, POWER BI, AND AZURE BI RESOURCES 13
#506-B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
IT Real-Time training that work for your career.
PROVIDED TRAINING FOR THOUSANDS OF STUDENTS .
SUBJECT, MATERIAL & VIDEOS Trainings:
CLASS ROOM
d
VIDEOS
PROVIDED ONLINE
FAST TRACK
ONE ON ONE
PROJECT TRAINING
Address:
Flat No: 506/B
Nilgiri Block
Data warehouse Fundamentals Aditya Enclave
Mytrivanam Area
MATERIAL
Hyderabad.
www.msbivinay.blogspot.in
Contact Information
+91 9573168449
040 66638869
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 2
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 3
DATA
DATA is composed of observable and recordable facts that are often found in
operational and transactional system.
INFORMATION
Information is an integrated collection of facts and is used as the basis for decision making. In
a data warehouse environment, data only comes to have value to end-users when it is
organized and presented as information
OLTP (ONLINE TRANSACTION PROCESSING)
It stores near real time data from transactional processing applications (daily 3 times/4
times).Majorly suitable for a) Input for DWH projects b) Can act like enterprise database incase
transactional processing database goes down.
OLAP (ONLINE ANALYTICAL PROCESSING)
OLAP is an abbreviation of ONLINE ANALYTICAL PROCESSING. This system is an application
that collects, manages, processes and presents multidimensional data for Analysis and
management purposes.
DATA MINING
DATA MINING is the process of Analyzing data from different Perspectives and summarizing it
into useful information.
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 4
BI (BUSINESS INTELLIGENCE)
BI is the Leveraging of Data warehouse to help and make business decisions and
Recommendations. Information and data rules engines are leveraged here to help make
these decisions along with Statistical Analysis tools and data Mining Tools.
OLCP (ONLINE COMPLEX PROCESSING)
OLCP is typified by a moderate number of rows processed against multiple databases with a
response in minutes, not seconds. Filling out an application for instant credit in a store is an
OLCP transaction. Another example is getting an instant approval on an interest rate for a
loan.
DSS (DECISION SUPPORT SYSTEMS)
Decision Support Systems include batch Reports, which Roll-up numbers to give
business the big picture, and overtime, have evolved.
Instead of pre-written scripts, users now require the ability to do adhoc queries, which are
unpredictable in their processing and which allow "what if types of questions. These types of
questions are essential for long range Planning.
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 5
more optimized techniques to run complex analytic queries. The traditional methods are
relatively less efficient and not cost-effective to fit into the modern day Data Warehousing
needs. There are tons of Cloud solutions to build data warehouses performance optimized,
inexpensive, and support parallel query execution.
Multi-Structured Data
• Define Big Data & Analytics Infrastructure for multiple storage data with a polyglot persistence
strategy.
• Integrate portions of the data into the Data Warehouse.
• Federated query access.
Lambda Architecture
Hybrid Architecture
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 6
Data Lakes - Instead of storing in hierarchical files and folders, as traditional data warehouse
do, a data lake is the repository that holds a vast amount of raw data in its native format until
needed.
Data divided across organizations - Modern Data Warehousing allows for quicker information
Assortment and Analysis across organizations and divisions. It keeps the Agility model and
promotes more alignment and sooner effect.
IoT streaming data - The Internet of Things has completely transformed the scenario, units, etc.
share and stock data across multiple devices.
Business Challenges
• Variety of subject areas & data sources for analysis with the capability to handle the large volume
of data.
• Expansion beyond a single relational DW/Data Mart structure to include Data Lake.
• Logical design across multi-platform architecture balancing performance & scalability.
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 7
Define the Compression Formats and Data Storage - There can be more than one option for
data storage. Each storage option offers distinct advantages and benefits. It is necessary to
evaluate the data formats and storage to work smoothly with the applications in an ecosystem.
Look out for Multi-tenancy Support - Multi-tenancy support is important for the BI
environment. It gives the advantage of using a single software stack to serve thousand of
partners & customers and make upgrades or customization.
Review the Schema - Evaluate the nature of the database storage. Verify how it’s loaded,
processes, and analyzed to optimize schema objects.
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 8
The opportunities of Big Data and Advanced analytics are a big challenge. The most
sophisticated traditional Data Warehouse changing to meet the requirements of the Modern
Data Enterprise. Increase in volume expected to continue. Business velocity continues to change
business operations and customer interactions. Data becomes even more diverse and more
available than ever before. Big Data means a big impact on business. To dig into the immense
new opportunities of Big Data, the Modern enterprise needs a Modern data platform.
Microsoft Modern Data Warehouse delivers platform, solutions, features, functionality, and
benefits that empower the Modern Enterprise in three essential areas -
• Easily manage relational and non-relational data at all volumes and high performance.
• Enjoy a consistent experience across On-premises and Cloud.
• Gain insights from BI and Advanced analytics across all data wherever it resides.
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 9
Simple Definition:
Database which stores huge volumes of data and mainly designed for decision making.
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 10
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 11
Bill Inmon, considered to be the father of Data Warehousing provides the following
definition:
“A Data Warehouse is a subject oriented, integrated, time variant and nonvolatile data”
Sean Kelly, another leading data warehousing practitioner defines the data warehouse in
the following way.
The data in the data warehouse is: Separate, Available and Accessible
A) SUBJECT ORIENTED:
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 12
B) INTEGRATED:
C) Time Variant
D) NONVOLATILE:
Every business transaction does not update the data in the data warehouse. The business
transactions update the operational system databases in real time. We add, change, or
delete data from an operational system as each transaction happens but do not usually
update the data in the data warehouse. You do not delete the data in the data
warehouse in real time. Once the data is captured in the data warehouse, you do not run
individual transactions to change the data there. Data updates are commonplace in an
operational database; not so in a data warehouse. The data in a data warehouse is not as
volatile as the data in an operational database is. The data in a data warehouse is
primarily for query and analysis.
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 13
DATA GRANULARITY
Data granularity in a data warehouse refers to the level of detail data. The lower the level of
detail, the finer the data granularity. When you maintain low level of data (day), then upper
levels you can analyze easily (week, fortnight, month etc.)
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 14
A data structure that is optimized for access. It is designed to facilitate end-user analysis of
data. It typically supports a single, analytic application used by a distinct set of workers.
Practical Way:
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 15
Data marts created first and then DWH DWH created first and then Data marts
DM1 DM2 DM3
DWH
DWH
Top-Down Approach[INMON]
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 16
Bottom-Up Approach[KIMBALL]
• Each data mart has its own narrow view of data _ Permeates redundant
data in every data mart
• Perpetuates inconsistent and irreconcilable data
• Proliferates unmanageable interfaces
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 17
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 18
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 19
Picture
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 20
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 21
DWH FAQS
IT applications
Q: What is Data warehouse [Single line] and warehouses available in the market?
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 22
A: BI is a process which uses OLAP approach to gather, convert and presents the data.
A: Analysis talks about 'current understanding of data' and 'past analysis of data', whereas
mining talks about 'future prediction of data'.
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 23
Famous DWH life cycles: Agile, iterative incremental [Block approach], V model
Inman Characteristics:
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 24
b) Independent-- Directly created from source systems [we don't use DWH here]
Ex: ICICI employee payroll System [No history, not much analysis required]
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 25
Q: How many types of DWH approaches available, which approach your company
following?
As:
Two approaches
a) Kimball approach--Datamarts-> DWH [Bottom up approach]
b) Inmon approach-- DWH -->Datamarts [Top down approach]
My company using Kimball approach for DWH implementation because of dynamic
decisions and adhoc requests.
ROLAP:
Relational OLAP--Data and aggregates in the relational area [OLTP area]
Latency time less [fresh data analysis]
Slower analysis
Minimal set up
Ex: Small, Medium
MLOAP:
Multidimensional OLAP-- Data and aggregates in multidimensional area [Cube]
Adv: More and detailed analysis this is helpful
Latency time is high [fresh data analysis is not possible]
Complex set up
Ex: Corporates
HOLAP:
Data in relational area and aggregates in multidimensional area [cube]
Ex: Latency time average
Avg set up
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 26
DOLAP:
Desktop OLAP: Here the data and aggregates on PC based desk top applications
Ex: Excel, Lotus, FoxPro, VISICALC etc...
A:
Day-->Week-->Fort Night-->Month-->Quarter-->Half Year (Semester)-->Year→Quad
year→Decade→Century
A: milliseconds→Seconds→Minutes→Hours
Q: You have two databases with same size, then how do you identify which is OLTP or
OLAP?
Correct; a, b, c, e
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 27
A:
If an application support Personal, Team and Corporate analysis, then that application is SSBI
application.
With respect to Power BI, SSBI indicate accessing, creation, managing {content packs and
apps), reports and dash boards.
Note: Users who have Pro account, they consider as SSBI professionals.
Q: What is OLTP?
A: Online Transaction Processing, this process helps to store daily business data.
Q: What is OLAP?
A: Online Analysis Processing, this process gathers, convers and presents data.
Q: What is BI?
A:
It is the process of gathering, converting and presenting business data for decision making
purpose.
A:
Q: What is a Modern Data Warehouse? [Social media, IOT, Business data and Cloud data
{Lake}]
Polyglot persistence encourages the most suitable data storage technology based on data.
This "best-fit engineering" aligns multi-structure data into data lakes and considers NoSQL
solutions for JSON formats. Pursuing a polyglot persistence dat strategy benefits from
virtualization and takes advantage of the different infrastructure. Modern DW requires
Petabytes of storage and more optimized techniques to run complex analytic queries.
A:
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 28
b) Unstructured storage Data warehouse [File Streams and Cloud Storages used]
A:
The Internet of things (IoT) refers to the concept of extending Internet connectivity beyond
conventional computing platforms such as personal computers and mobile devices, and into
any range of traditionally "dumb" or non-internet-enabled physical devices and everyday
objects. Embedded with electronics, Internet connectivity, and other forms of hardware (such
as sensors), these devices can communicate and interact with others over the Internet, and
they can be remotely monitored and controlled
"these analytics can help you decide if it's time to deliver content in different ways"
Analytics is the scientific process of discovering and communicating the meaningful patterns
which can be found in data.
Q: What is Polybase?
A:
PolyBase is a technology that accesses and combines both non-relational and relational data,
all from within SQL Server. It allows you to run queries on external data in Hadoop or Azure blob
storage. The queries are optimized to push computation to Hadoop.
Q: What is Hadoop?
Hadoop is an open source distributed processing framework that manages data processing
and storage for big data applications running in clustered systems. It provides massive storage
for any kind of data, enormous processing power and the ability to handle virtually limitless
concurrent tasks or jobs.
Q: What is Azure?
A:
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 29
Microsoft Azure is a cloud computing service created by Microsoft for building, testing,
deploying, and managing applications and services through Microsoft-managed data
centers.
Q: What can Microsoft Azure Do?
Microsoft maintains a growing directory of Azure services, with more being added all the time.
All the elements necessary to build a virtual network and deliver services or applications to a
global audience are available, including:
Virtual machines. Create Microsoft or Linux virtual machines (VMs) in just minutes from a wide
selection of marketplace templates or from your own custom machine images. These cloud-
based VMs will host your apps and services as if they resided in your own data center.
SQL databases. Azure offers managed SQL relational databases, from one to an unlimited
number, as a service.This saves you overhead and expenses on hardware, software, and the
need for in-house expertise.
Azure Active Directory Domain services. Built on the same proven technology as Windows
Active Directory, this service for Azure lets you remotely manage group policy, authentication,
and everything else. This makes moving and existing security structure partially or totally to the
cloud as easy as a few clicks.
Application services. With Azure it’s easier than ever to create and globally deploy applications that
are compatible on all popular web and portable platforms. Reliable, scalable cloud access lets you
respond quickly to your business’s ebb and flow, saving time and money. With the introduction of Azure
WebApps to the Azure Marketplace, it’s easier than ever to manage production, testing and
deployment of web applications that scale as quickly as your business. Prebuilt APIs for popular cloud
services like Office 365, Salesforce and more greatly accelerate development.
Visual Studio team services. An add-on service available under Azure, Visual Studio team services
offer a complete application lifecycle management (ALM) solution in the Microsoft cloud. Developers
can share and track code changes, perform load testing, and deliver applications to production while
collaborating in Azure from all over the world. Visual Studio team services simplify development and
delivery for large companies or new ones building a service portfolio.
Storage. Count on Microsoft’s global infrastructure to provide safe, highly accessible data
storage. With massive scalability and an intelligent pricing structure that lets you store
infrequently accessed data at a huge savings, building a safe and cost-effective storage plan
is simple in Microsoft Azure.
Lake is a storage area for structured, semi structured and unstructured data.
A Hadoop data lake is a data management platform comprising one or more Hadoop clusters.
It is used principally to process and store non relational data, such as log files, internet
clickstream records, sensor data, JSON objects, images and social media posts.
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
MSBI (DEMO, DWH FUNDAS, DATA MODEL, SQL SERVER INTEGRATION SERVICES, AND FAQS) 30
Azure Data Lake Service is Microsoft’s internal big data system where
Users can store structured, semi-structured or unstructured data produced from applications
including social networks, relational data, sensors, videos, web apps, mobile or desktop
devices. A single Azure Data Lake Store account can store trillions of files where a single file
can be greater than a petabyte in size.
What is U-SQL?
Users can develop and run parallel data transformation and processing programs in U-SQL.
#506/B, Nilgiri Block, Aditya Enclave, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 1
Step 3) Power BI Existence in the project {reason behind using Power BI}, receivables and
deliverables
Step 1:
It has multiple alias names of the business for running different courses.
Step 2:
Management wants to analyze students joining, course completions, enquires in various locations for
different courses in different modes.
Ex:
Current vs Last year Vs. Two years Prior DiscountFee collection in different locations.
Year over year students count growth and fee collection growth
Etc…
Step 3:
Power BI is used for data extraction, modeling, visualizing, creating reports and Dash boards
Creating APP spaces and Mobile view for easy understanding and browsing of reports.
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 2
Step 4:
2. Closely worked with the customer in getting relevant documents [Business and Report Technical
Design] from share point portal, Analyzing, requesting for clarification, and working on.
3. Retrieve data {specially excel} from one drive, and Azure SQL databases.
5. Created many DAX measures, calculated columns to implement date, time, statistical, and
mathematical operations to show on the visuals.
6. Created book marks, drill down, drill through, and button actions on the reports
7. Used various filters {Report, Page, Visual, Drill through}, Slicers {List, Rang, Drop Down},
8. Worked on Single item visuals {KPI, Gauges, and Cards} and Multi Item Visuals {table, matrix,
Multirowcard etc…}
9. Displayed analytical and trend data using various charts and maps
11.Tested the report against database {with sql}, excel {excel formulas} etc…
13. Created workspaces and appspaces (new app spaces) in the recent times by moving from
content packs
14.Created dashboard using report tiles, books marks, and other actions.
15. Specified users to access reports at data set row level security
16. Specified Scheduled refresh for the report based on customer instructions
17.Shared and Subscribed the the reports, dashboards ad per customer requirement.
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 3
Dashboard explanation:
If a user clicks a particular image based on interest, respective book mark report will open.
Users can use filters {customer filter, date filter} to see the respective data and insights
If they want to come back to home page, the back button is helpful.
PRACTICAL IMPLEMENTATION:
3. Create statistical cumulative type of measures, identity and use on visuals [charts]
h) Implement Row level security on Region table to protect data access to users.
m) Share or subscribe it
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 4
Business Description:
Development of a Power BI showcase submission that has proven to be very popular, based on
understanding your customers better.
Dynamically drill into your customer sales data and reveal instant insights to drive decision
making and resource allocation.
We are working with sales data for an organization that sells a variety of products throughout
Europe.
Model Creation:
A proper model created based on the questions raised and the kind of answers to be given:
How are my sales going this year versus last year or the year before that?
How have my profits differed for each particular product through time?
What is the average margin achieved for customers and how have margins through time
compared?
When was the last time we sold to a customer?
What were the most recent sales per region?
These are some solid questions and more that nearly all businesses would like to answer if they
are selling something.
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 5
The first thing we will notice is that we have some lookup tables. These include a table of dates,
customer, products and regions. These all have a one-to-many relationship with the fact table,
which is the sales table.
Structuring our models this way makes writing DAX code and creating reports far more intuitive.
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 6
Page Setup:
Visual section:
Drillthrough
Keep all filters: ON --To pass the filters from Home Page.
Format Section:
Page Information:
Q & A: ON
Page Background:
Color: #266C59
Transparency: 0%
Add HomePage.jpg
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 7
Page Alignment:
Select which page to navigate by clicking an image below-->Is a textbox with yellow color
Image1:
Scaling: Normal
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 8
Visual Header: ON
Image2:
Visual Header: ON
Imag3:
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 9
Bookmarks (1)
Customers:
Page Setup:
Visual section:
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 10
Format Section:
Page Information:
Page Size:
Type: Custom
Transparency: 0%
Page Alignment:
This report has four filters for look up tables. [Customers, Dates, Product, and Ranges]
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 11
Now that we have our data model set up correctly we are ready to write some DAX that will get
us the calculations we need to answer our questions. Always start simple and then overlay some
DAX coding patterns to get the more specific results.
a) Start with our [CORE MEASURES]. Things like 'total sales', 'total profits', 'profit margins' etc.
Now we've got our core measures done we can already do some great stuff. We have all our
dimensions nicely set up in the data model and we have these measures that we can bring into
a visual and then dynamically view these in any context we want.
From here we want to get more specific. We want to start answering these questions that are
actually going to improve our understanding of our customers and consequently our decision
making.
1. Firstly, what were our sales last year and the year before that.
3. Thirdly, we need to work out what the lifetime margins are for our clients.
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 12
All you have to do here is drag these new measures onto the report canvas and view them
against the product and date contexts.
Now we move onto cumulative totals. This is a great DAX pattern. You will use this over and over again.
Once you understand this pattern and use it once, you can re-use it anywhere, just sub in a new core
measure.
CALCULATE([Total Sales],
FILTER( ALLSELECTED(Dates),Dates[Date]<=MAX(Dates[Date])
Explanation
b) FILTER and ALLSELECTED statements are removing any filters that are on dates, but only for the
context which is selected in our date slicers in this case.
c) Then the function iterates through the date table and checks to see if each date is less than
the current max date in the current evaluation context.
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 13
CALCULATE([Sales LY],
FILTER( ALLSELECTED(Dates),Dates[Date]<=MAX(Dates[Date])
FILTER( ALLSELECTED(Dates),Dates[Date]<=MAX(Dates[Date])
Now we have all the calculations we need for a cumulative totals comparison chart.
Lastly we want to work out the lifetime margins on our customers, then compare each sale
versus that margin.
In the first instance, by combining CALCULATE with ALLEXCEPT we are able to see the total
lifetime profit margins for each individual client. In the ALLEXCEPT function, we have said to
ignore any context except for whichever is coming from the customers table. That means that if
there is a filter from the date, products, or regions table ignore it. Only keep filters from the
Customer Name column, which stems from our customers slicer.
Now all we have to do is overlay our profit margins measure from earlier and we are able to
compare these two like the below.
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 14
Customer Profitability
Page Setup:
Visual section:
Drillthrough
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 15
Format Section:
Page Information:
Q & A: ON
Page Size:
Type: Custom
Page Background:
Color: #266C59
Transparency: 0%
Page Alignment:
Customer Segmentation
Page Setup:
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
VINAYTECH POWER BI PROJECT PRACTICE 16
Visual section:
Drillthrough
Format Section:
Page Information:
Q & A: ON
Page Size:
Type: 16:9
Page Background:
Color: #689FB0
Transparency: 0%
Page Alignment:
# 506-B, Nilgiri Block, Aditya Encalve, Ameerpet, Hyd. Ph: 040 66638869/ 9573168449
10
INCHCAPE CONFIDENTIAL
HUMAN RESOURCE MANAGEMENT BUSINESS AND TECHNICAL UNDERSTANDING
1 |Business Description and Technical Entity Relationship Model
Business Description:
Team Size 6 [Onshore and offshore] Leading by Mr. Andrew Dixon from London.
Description Inchcape plc is the global distribution and retail leader in the premium and luxury automotive sectors.
Operating from different geographic locations and headquarter is London. Besides its business units it
has a strong and enrich employee management system. The strategic, tactic and predictive analytical
system expecting appropriate and dynamic dashboards and score cards.
It has employees of Full Time, Part Time and Permanent. They are paid for hourly, daily and weekly.
Employees joining in the organization in various age groups through different recruitment processes
and from numerous agencies. There are restrictions while separating from the organization (voluntary
and involuntary) [Refer to doc in SharePoint site http://inchcape//employeeshire//seperations.pdf or
download from GitHub]
We require a single view to analyze all the details for better employee’s management and control of
resources separations in order to compete and grow in the market leadership.
Desired solution:
Entity Relation Ship Model proposed by Andrew Dixon [Refer to ERWin.doc in SharePoint site]
https://github.com/vinaytechhouse/RETAIL_PROJECTS/blob/master/InchCape%20Human%20Resources%20Data%20Ta
bles.pbit
Inchcape plc is the global distribution and retail leader in the premium and luxury automotive sectors.
Operating from different geographic locations and headquarter is London. Besides its business units it has a strong and
enrich employee management system.
The strategic, tactic and predictive analytical system expecting appropriate and dynamic dashboards and score cards.
I participated in the employee management process for dashboards and score cards creation using
It has employees of Full Time, Part Time and Permanent. They are paid for hourly, daily and weekly.
Employees joining in the organization in various age groups through different recruitment processes and from numerous
agencies. There are restrictions while separating from the organization.
We require a single view to analyze all the details for better employee’s management and control of resources separations in
order to compete and grow in the market leadership.
Desired solution:
e)Responsibilities handled
I got this business understanding and other required documents from customer through GitHub repository.
Used many inbuilt visuals and implemented buttons, drill down and drill through actions.
Used Power Query M-Script for few changes and implemented more transforms using
Power Query in built options [Merge, Append, Keep, Remove, Replace, Unpivot etc…]
Implemented Data validation and Query plan observation using DAX studio.
Created content pack library and made the reporting access easier.
Note: Azure data connection for Tabular Model or Sql Server Dataware House or Data Lake is added advantage.
4 |Business Description and Technical Entity Relationship Model
AgeGroup Query:
Hide in Report View: AgeGroupID
BU Query:
Measure Expression Hide in Report View
Count of BU Count of BU = COUNTA('BU'[BU])
Date Query:
Measure Expression Hide in Report View
Count of Date Count of Date = COUNTA('Date'[Date])
MonthIncrementNumber MonthIncrementNumber = ([Year]-MIN([Year]))*12 Yes
+[MonthNumber]
Create Hierarchy
YearQtrNumberPeriodNumber
Employee Query:
Measure Expression Hide in Report View
Count of Date Actives = CALCULATE([EmpCount], FILTER(Employee,
ISBLANK(Employee[TermDate])))
Actives YoY % Change Actives YoY % Change = DIVIDE([Actives YoY Var], [Actives
SPLY])
AVG Tenure Months AVG Tenure Months = ROUND([AVG Tenure Days]/30, 1)-1
Bad Hires YoY Var Bad Hires YoY Var = [Sum of BadHires]-[Bad Hires SPLY]
New Hires YoY % Change New Hires YoY % Change = DIVIDE([New Hires YoY Var], [New
Hires SPLY])
New Hires YoY Var New Hires YoY Var = [New Hires]-[New Hires SPLY]
Seps YoY % Change Seps YoY % Change = DIVIDE([Seps YoY Var], [Seps SPLY])
TenureMonths = CEILING([TenureDays]/30, 1) -1
TO % TO % = DIVIDE([Seps], [Actives])
FP Query:
Gender Query:
Hide in Report View: ID, Sort
PayType Query:
Hide in Report View: PayTypeID
SeperationReason Query:
Hide in Report View: SeperationTypeID
Page Setup:
Note: Till 2016, there was an option called Dynamic, now we need to use Page View and Page Size combination.
7 |Business Description and Technical Entity Relationship Model
Page Setup:
Page Information
Name:
Q&A
Page Size
Type:
Page Background
Color:
Page Level Filters:
AGeGroup is (ALL)
Ethnicity is (ALL)
FPDESC is (ALL)
Gender is (ALL)
Month is not (DEC)
Region is (ALL)
SeperationReason is (ALL)
VP is (ALL)
Year is (2014)
Note: Till 2016, there was an option called Dynamic, now we need to use Page View and Page Size combination.
10 |Business Description and Technical Entity Relationship Model
Title: Title Text (BadHire%ofActives by AgeGroup), Font Color (#C8C8C8), Background color (#374649), Alignment (Left),
Text Size (9), Font Family (Segoe UI)
Tooltip: Type (Report Page) Page (Auto)
Visual Header (On)
Visual 3: Line chart
Axis: Month
Legend: AgeGroup
Values: Bad Hires YoY% Change
Visual Level Filters: Ensure all the above fields (All)
Legend: Position (Top), Title (On), Legend (AgeGroup),Color (Grey), Font Family (Segoe UI), Text Size (8), Style (Markers
only), Match Line Color (On), Circle Default Icon (On)
X-Axis: Type (Categorical),Color (Grey), Text size (11), Font Family (Segoe UI),Minimum Category Width (20),Max
Size(25%), Inner Padding (20%), Concatenate Labels (On) Title (Off)
Y-Axis (Column): Position (Left), Scale Type (Linear), Start (Auto), End (Auto), Color (Grey), Text Size (11), Font Family
(Segoe UI), Display units (Auto), Gridlines (On), Color (White), Stroke width (1), Line Style (Solid), Show secondary (On)
Data Colors: <30 (#01B8AA), 30-49 (#374649), 50+ (#FD625E)
Shape: Stroke Width (2), Join Type (Round), Line Style (Solid)
Plot Area: Transparency (50%)
Tile: Title Text (Bad Hires YoY % Change by Month and AgeGroup), Font Color (#C8C8C8), Background color (#5F6B6D),
Alignment (Left), Text Size (9), Font Family (Segoe UI)
Tooltip: Type (Report Page) Page (Auto)
Visual Header (On)
Visual 4: Stacked column chart
Shared Axis: Region, VP
Column Series: Ethnicity
Column Values: Bad Hires
Visual Level Filters: Ensure all the above fields (All)
Legend: Position (Top), Title (On), Legend Name (Ethnicity), Color (Grey), Font Family (Segoe UI), Text Size (8), Style
(Markers only), Match Line Color (On), Circle Default Icon (On)
X-Axis: Color (Grey), Text size (11), Font Family (Segoe UI),Minimum Category Width (20),Max Size(25%), Inner Padding
(20%), Concatenate Labels (On) Title (Off)
Y-Axis (Column): Position (Left), Scale Type (Linear), Start (Auto), End (Auto), Color (Grey), Text Size (11), Font Family
(Segoe UI), Display units (Auto), Gridlines (On), Color (White), Stroke width (1), Line Style (Solid), Show secondary (On)
Data Colors: Group A (#374649), Group B (#374649), Group C (#01B8AA),
Group D (#F2C80F), Group E (#5F6B6D), Group F (#BAD4EB), Group G (#FE9666)
Shape: Stroke Width (2), Join Type (Round), Line Style (Solid)
Plot Area: Transparency (50%)
Tile: Title Text (BadHires by Region and Ethnicity), Font Color (#C8C8C8), Background color (#5F6B6D), Alignment (Left),
Text Size (9), Font Family (Segoe UI)
Tooltip: Type (Report Page) Page (Auto)
Visual Header (On)
15 |Business Description and Technical Entity Relationship Model
Page Setup:
Page Information
Name: New Hires Scorecard
Q & A On
Page Size
Type: Cortana
Page Background
Color: White
Page Level Filters:
Year is 2014
Visual 1: Slicer
Field: VP
Visual Level Filters: NO Filters
Format:
General: Outline color (Black, 20% lighter), Outline weight (1), X position (10), Y position (78), Width (276), Height (77)
Selection Controls: Single Select (On)
Slicer Headings: Font Color (Black) Background (Black, 40% lighter), Outline (None), Text Size (9), Font Family (Segoe UI)
Items: Font Color (Black, 20% lighter), Background (Black, 20% lighter), Outline (None), Text Size (9), Font Family (Segoe
UI)
Visual Header (On)
Visual 2: Line chart
Axis: Month
16 |Business Description and Technical Entity Relationship Model
General: Responsive (Off), X Position (4), Y Position (166), Width (286), Height (112), High Density Sampling (On)
Legend: Position (Top), Title (On), Color (Grey), Font Family (Segoe UI), Text Size (8), Style (Markers only), Match Line
Color (On), Circle Default Icon (On)
X-Axis: Type (Categorical),Color (Grey), Text size (11), Font Family (Segoe UI),Minimum Category Width (20),Max
Size(25%), Inner Padding (20%), Concatenate Labels (On) Title (Off)
Y-Axis (Column): Position (Left), Scale Type (Linear), Start (Auto), End (Auto), Color (Grey), Text Size (11), Font Family
(Segoe UI), Display units (Auto), Gridlines (On), Color (White), Stroke width (1), Line Style (Solid), Show secondary (On)
Data Colors: New Hires (#01B8AA)
Shape: Stroke Width (2), Join Type (Round), Line Style (Solid)
Plot Area: Transparency (50%)
Tile: Title Text (New Hires by Month), Font Color (#C8C8C8), Background color (#5F6B6D), Alignment (Left), Text Size (9),
Font Family (Segoe UI)
Tooltip: Type (Report Page) Page (Auto)
Visual Header (On)
Visual 3: Clustered Column Chart
Axis: FPDesc
Legend: AgeGroup
Value: New Hires
Visual Level Filters: Ensure all the above fields (All)
General: Responsive (Off), X Position (6), Y Position (290), Width (279), Height (160), High Density Sampling (On)
Legend: Position (Top), Title (On), Legend Name (AgeGroup), Color (Grey), Font Family (Segoe UI), Text Size (8)
X-Axis: Color (Grey), Text size (11), Font Family (Segoe UI), Minimum Category Width (20), Max Size(25%), Inner Padding
(20%), Title (Off), Concatenate labels (On)
Y-Axis : Position (Left), Scale Type (Linear), Start (Auto), End (Auto), Color (Grey), Text Size (11), Font Family (Segoe UI),
Display units (Auto), Gridlines (On), Color (White), Stroke width (1), Line Style (Solid), Show secondary (On)
Data Colors: <30 (#01B8AA), 30-49 (#374649), 50+ (#FD625E)
Plot Area: Transparency (50%)
Tile: Title Text (New Hires by FPDesc and AgeGroup), Font Color (#C8C8C8), Background color (#5F6B6D), Alignment
(Left), Text Size (9), Font Family (Segoe UI)
Tooltip: Type (Report Page) Page (Auto)
Visual Header (On)
Title: Title Text (New Hires by Gender), Font Color (White), Background Color (Black, 20% lighter), Alignment (Left), Text
Size (9), Font Family (Segoe UI)
General: X Position (3), Y Position (467), Width (146), Height (125)
Tooltip: Type (Report Page) Page (Auto)
Visual Header (On)
Visual 5: Pie Chart
Details: PayType
Values: New Hires
Visual Level Filters: Ensure all the above fields (All)
Data Colors: Hourly (#01B8AA), Salaried (#374649)
Detail Labels: Label style (Category, data value), Color (#777777), Display Units (Auto), Text Size: 9, Font Family (DIN),
Label Position (Outside)
Title: Title Text (New Hires by PayType), Font Color (White), Background Color (Black, 20% lighter), Alignment (Left),
Text Size (9), Font Family (Segoe UI)
General: X Position (150), Y Position (467), Width (144), Height (125)
Tooltip: Type (Report Page) Page (Auto)
Visual Header (On)