Archive for August, 2020

Recently I restored one SharePoint content DB to another server in my on-premise environment and when i tried to access the site, it was not accessible and I was seen below error.

Error:

Failed to create a custom control ‘PublishingSiteActionsMenuCustomizer’, feature ‘Publishing’ (id:22a9ef51-737b-4ff2-9346-123456789) using attributes (ControlSrc=”, ControlAssembly=’Microsoft.SharePoint.Publishing, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9111111e94′, ControlClass=’Microsoft.SharePoint.Publishing.WebControls.PublishingSiteActionsMenuCustomizer’: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.  Parameter name: value
at System.DateTime.AddTicks(Int64 value)
at Microsoft.SharePoint.Publishing.CacheManager.HasTimedOut()
at Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite site, Boolean useContextSite, Boolean allowContextSiteOptimization, Boolean refreshIfNoContext)
at Microsoft.SharePoint.Publishing.WebControls.CombinedBasePermissions..ctor()
at Microsoft.SharePoint.Publishing.WebControls.ConsoleVisibleUtilities.get_CanShowSiteActionsMenuItems()
at Microsoft.SharePoint.Publishing.WebControls.PublishingSiteActionsMenuCustomizer..ctor()     –
— End of inner exception stack trace —
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.SharePoint.Utilities.SPUtility.CreateServerControlFromAssembly(String sControlAssembly, String sControlClass, SPWeb web)
at Microsoft.SharePoint.SPControlElement.BuildCustomControl(TemplateControl tctlPage, SPWeb web, String sControlAssembly, String sControlClass, String sControlSrc, XmlNode xnElementDefinition, SPFeatureDefinition featdefElement, String sElementId)
at Microsoft.SharePoint.SPControlElement.BuildCustomControl(TemplateControl tctlPage, String sControlAssembly, String sControlClass, String sControlSrc, XmlNode xnElementDefinition, SPFeatureDefinition featdefElement, String sElementId)
at Microsoft.SharePoint.SPCustomActionElement.BuildCustomControl(TemplateControl tctlParent)
at Microsoft.SharePoint.WebControls.FeatureMenuTemplate.CreateChildControls().

Resolution:

After some research, I given full control to service account at web application level and I’m able to access the site with out any issues.

Domain Controllers (DC) require a root key to begin generating gMSA passwords. The domain controllers will wait up to 10 hours from time of creation to allow all domain controllers to converge their AD replication before allowing the creation of a gMSA. The 10 hours is a safety measure to prevent password generation from occurring before all DCs in the environment are capable of answering gMSA requests. If you try to use a gMSA too soon the key might not have been replicated to all domain controllers and therefore password retrieval might fail when the gMSA host attempts to retrieve the password. gMSA password retrieval failures can also occur when using DCs with limited replication schedules or if there is a replication issue.

Membership in the Domain Admins or Enterprise Admins groups, or equivalent, is the minimum required to complete this procedure. For detailed information about using the appropriate accounts and group memberships, see Local and Domain Default Groups.

To create the KDS root key using the Add-KdsRootKey cmdlet

  1. On the Windows Server 2012 or later domain controller, run the Windows PowerShell from the Taskbar.
  2. At the command prompt for the Windows PowerShell Active Directory module, type the following commands, and then press ENTER:Add-KdsRootKey -EffectiveImmediately

For test environments with only one DC, you can create a KDS root key and set the start time in the past to avoid the interval wait for key generation by using the following procedure. Validate that a 4004 event has been logged in the kds event log.

To create the KDS root key in a test environment for immediate effectiveness

  1. On the Windows Server 2012 or later domain controller, run the Windows PowerShell from the Taskbar.
  2. At the command prompt for the Windows PowerShell Active Directory module, type the following commands, and then press ENTER:$a=Get-Date

    $b=$a.AddHours(-10)

    Add-KdsRootKey -EffectiveTime $b

    Or use a single command

    Add-KdsRootKey -EffectiveTime ((get-date).addhours(-10))

 

SDLC

Posted: August 30, 2020 in Miscellaneous

SDLC is a process followed for a software project, within a software organization. It consists of a detailed plan describing how to develop, maintain, replace and alter or enhance specific software. The life cycle defines a methodology for improving the quality of software and the overall development process.

The following figure is a graphical representation of the various stages of a typical SDLC.

Stages of SDLC

A typical Software Development Life Cycle consists of the following stages −

Stage 1: Planning and Requirement Analysis

Requirement analysis is the most important and fundamental stage in SDLC. It is performed by the senior members of the team with inputs from the customer, the sales department, market surveys and domain experts in the industry. This information is then used to plan the basic project approach and to conduct product feasibility study in the economical, operational and technical areas.

Planning for the quality assurance requirements and identification of the risks associated with the project is also done in the planning stage. The outcome of the technical feasibility study is to define the various technical approaches that can be followed to implement the project successfully with minimum risks.

Stage 2: Defining Requirements

Once the requirement analysis is done the next step is to clearly define and document the product requirements and get them approved from the customer or the market analysts. This is done through an SRS (Software Requirement Specification) document which consists of all the product requirements to be designed and developed during the project life cycle.

Stage 3: Designing the Product Architecture

SRS is the reference for product architects to come out with the best architecture for the product to be developed. Based on the requirements specified in SRS, usually more than one design approach for the product architecture is proposed and documented in a DDS – Design Document Specification.

This DDS is reviewed by all the important stakeholders and based on various parameters as risk assessment, product robustness, design modularity, budget and time constraints, the best design approach is selected for the product.

A design approach clearly defines all the architectural modules of the product along with its communication and data flow representation with the external and third party modules (if any). The internal design of all the modules of the proposed architecture should be clearly defined with the minutest of the details in DDS.

Stage 4: Building or Developing the Product

In this stage of SDLC the actual development starts and the product is built. The programming code is generated as per DDS during this stage. If the design is performed in a detailed and organized manner, code generation can be accomplished without much hassle.

Developers must follow the coding guidelines defined by their organization and programming tools like compilers, interpreters, debuggers, etc. are used to generate the code. Different high level programming languages such as C, C++, Pascal, Java and PHP are used for coding. The programming language is chosen with respect to the type of software being developed.

Stage 5: Testing the Product

This stage is usually a subset of all the stages as in the modern SDLC models, the testing activities are mostly involved in all the stages of SDLC. However, this stage refers to the testing only stage of the product where product defects are reported, tracked, fixed and retested, until the product reaches the quality standards defined in the SRS.

Stage 6: Deployment in the Market and Maintenance

Once the product is tested and ready to be deployed it is released formally in the appropriate market. Sometimes product deployment happens in stages as per the business strategy of that organization. The product may first be released in a limited segment and tested in the real business environment (UAT- User acceptance testing).

Then based on the feedback, the product may be released as it is or with suggested enhancements in the targeting market segment. After the product is released in the market, its maintenance is done for the existing customer base.

SDLC Models

There are various software development life cycle models defined and designed which are followed during the software development process. These models are also referred as Software Development Process Models”. Each process model follows a Series of steps unique to its type to ensure success in the process of software development.

Following are the most important and popular SDLC models followed in the industry −

  • Waterfall Model
  • Iterative Model
  • Spiral Model
  • V-Model
  • Big Bang Model

Other related methodologies are Agile Model, RAD Model, Rapid Application Development and Prototyping Models.

The Waterfall Model was the first Process Model to be introduced. It is also referred to as a linear-sequential life cycle model. It is very simple to understand and use. In a waterfall model, each phase must be completed before the next phase can begin and there is no overlapping in the phases.

The Waterfall model is the earliest SDLC approach that was used for software development.

The waterfall Model illustrates the software development process in a linear sequential flow. This means that any phase in the development process begins only if the previous phase is complete. In this waterfall model, the phases do not overlap.

Waterfall Model – Design

Waterfall approach was first SDLC Model to be used widely in Software Engineering to ensure success of the project. In “The Waterfall” approach, the whole process of software development is divided into separate phases. In this Waterfall model, typically, the outcome of one phase acts as the input for the next phase sequentially.

The following illustration is a representation of the different phases of the Waterfall Model.

SDLC Waterfall ModelThe sequential phases in Waterfall model are −

  • Requirement Gathering and analysis − All possible requirements of the system to be developed are captured in this phase and documented in a requirement specification document.
  • System Design − The requirement specifications from first phase are studied in this phase and the system design is prepared. This system design helps in specifying hardware and system requirements and helps in defining the overall system architecture.
  • Implementation − With inputs from the system design, the system is first developed in small programs called units, which are integrated in the next phase. Each unit is developed and tested for its functionality, which is referred to as Unit Testing.
  • Integration and Testing − All the units developed in the implementation phase are integrated into a system after testing of each unit. Post integration the entire system is tested for any faults and failures.
  • Deployment of system − Once the functional and non-functional testing is done; the product is deployed in the customer environment or released into the market.
  • Maintenance − There are some issues which come up in the client environment. To fix those issues, patches are released. Also to enhance the product some better versions are released. Maintenance is done to deliver these changes in the customer environment.

All these phases are cascaded to each other in which progress is seen as flowing steadily downwards (like a waterfall) through the phases. The next phase is started only after the defined set of goals are achieved for previous phase and it is signed off, so the name “Waterfall Model”. In this model, phases do not overlap.

Waterfall Model – Application

Every software developed is different and requires a suitable SDLC approach to be followed based on the internal and external factors. Some situations where the use of Waterfall model is most appropriate are −

  • Requirements are very well documented, clear and fixed.
  • Product definition is stable.
  • Technology is understood and is not dynamic.
  • There are no ambiguous requirements.
  • Ample resources with required expertise are available to support the product.
  • The project is short.

Waterfall Model – Advantages

The advantages of waterfall development are that it allows for departmentalization and control. A schedule can be set with deadlines for each stage of development and a product can proceed through the development process model phases one by one.

Development moves from concept, through design, implementation, testing, installation, troubleshooting, and ends up at operation and maintenance. Each phase of development proceeds in strict order.

Some of the major advantages of the Waterfall Model are as follows −

  • Simple and easy to understand and use
  • Easy to manage due to the rigidity of the model. Each phase has specific deliverables and a review process.
  • Phases are processed and completed one at a time.
  • Works well for smaller projects where requirements are very well understood.
  • Clearly defined stages.
  • Well understood milestones.
  • Easy to arrange tasks.
  • Process and results are well documented.

Waterfall Model – Disadvantages

The disadvantage of waterfall development is that it does not allow much reflection or revision. Once an application is in the testing stage, it is very difficult to go back and change something that was not well-documented or thought upon in the concept stage.

The major disadvantages of the Waterfall Model are as follows −

  • No working software is produced until late during the life cycle.
  • High amounts of risk and uncertainty.
  • Not a good model for complex and object-oriented projects.
  • Poor model for long and ongoing projects.
  • Not suitable for the projects where requirements are at a moderate to high risk of changing. So, risk and uncertainty is high with this process model.
  • It is difficult to measure progress within stages.
  • Cannot accommodate changing requirements.
  • Adjusting scope during the life cycle can end a project.
  • Integration is done as a “big-bang. at the very end, which doesn’t allow identifying any technological or business bottleneck or challenges early.

In Windows 2012 R2, I installed SharePoint 2013 and post PSConfig, when I tried to open central administration and failed with below error.

Error:

Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.TypeLoadException: Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’.

As per one of the MS article, we should execute

aspnet_regiis.exe /iru

The Aspnet_regiis.exe file can be found in one of the following locations:

%windir%\Microsoft.NET\Framework\v4.0.30319

%windir%\Microsoft.NET\Framework64\v4.0.30319 (on a 64-bit computer)

Since it is Windows 2012 R2, we were unable to execute the command.
Found the alternate solution as follows.
Solution:

This issue occurs because the Applicationhost.config file for Windows Process Activation Service (WAS) has the following section defined, and this section is incompatible with the .NET Framework 4.0:

<add name=”ServiceModel” type=”System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ preCondition=”managedHandler” />

This section should be defined as follows:

<add name=”ServiceModel” type=”System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ preCondition=”managedHandler,runtimeVersionv2.0″ />

Note You can find the Applicationhost.config file in the following location:

%windir%\system32\inetsrv\config

Ref: https://support.microsoft.com/en-us/help/2015129/error-message-after-you-install-the-net-framework-4-0-could-not-load-t

  1. A request arrives at HTTP.sys.
  2. HTTP.sys determines if the request is valid. If the request is not valid, it sends a code for an invalid request back to the client.
  3. If the request is valid, HTTP.sys checks to see if the request is for static content (HTML) because static content can be served immediately.
  4. If the request is for dynamic content, HTTP.sys checks to see if the response is located in its kernel-mode cache.
  5. If the response is in the cache, HTTP.sys returns the response immediately.
  6. If the response is not cached, HTTP.sys determines the correct request queue, and places the request in that queue.
  7. If the queue has no worker processes assigned to it, HTTP.sys signals the WWW service to start one.
  8. The worker process pulls the request from the queue and processes the request, evaluating the URL to determine the type of request (ASP, ISAPI, or CGI).
  9. The worker process sends the response back to HTTP.sys.
  10. HTTP.sys sends the response back to the client and logs the request, if configured to do so.

Ref: https://docs.microsoft.com/en-us/previous-versions/iis/6.0-sdk/ms524901(v%3Dvs.90)

Tips for SharePoint

Posted: August 28, 2020 in SharePoint On Premise

What is SharePoint? Organizations use Microsoft SharePoint to create websites. You can use it as a secure place to store, organize, share, and access information from any device. All you need is a web browser, such as Microsoft Edge, Internet Explorer, Chrome, or Firefox.

Access Services: Access Services is a means for building SharePoint applications using the Microsoft Access database management system. The applications created using Access Services become accessible in a Web browser.

Microsoft is pointing SharePoint Online users of Access Services to instead build their applications using PowerApps and Microsoft Flow. PowerApps is Microsoft’s template-driven application creation solution, while Microsoft Flow is a workflow automation creation tool frequently compared to the IFTTT mashup service.

Excel Services: Excel Services is a service application that enables you to load, calculate, and display Microsoft Excel workbooks on Microsoft SharePoint. Excel Services was first introduced in Microsoft Office SharePoint Server 2007.

By using Excel Services, you can reuse and share Excel workbooks on SharePoint portals and dashboards. For example, financial analysts, business planners, or engineers can create content in Excel and share it with others by using an SharePoint portal and dashboard—without writing custom code. You can control what data is displayed, and you can maintain a single version of your Excel workbook. There are four primary interfaces for Excel Services:

  • An Excel Web Access web part, which enables you to view and interact with a live workbook by using a browser
  • Excel Web Services for programmatic access
  • An ECMAScript (JavaScript, JScript) object model for automating and customizing, and to drive the Excel Web Access control and help build more compelling, integrated solutions as well as the ability to user user-defined functions to extend the ECMAScript (JavaScript, JScript) object model
  • A Representational State Transfer (REST) API for accessing workbook parts directly through a URL

By using Excel Services, you can view live, interactive workbooks by using only a browser. This means that you can save Excel workbooks and interact with them from within portal sites.You can also interact with Excel-based data by sorting, filtering, expanding, or collapsing PivotTables, and by passing in parameters; this provides the ability to perform analysis on published workbooks. You can interact with a workbook without changing the published workbook—which is valuable for report authors and report consumers.Excel Services supports workbooks that are connected to external data sources. You can embed connection strings to external data sources in the workbook or save them centrally in a data connection library file.You can also make selected cells in worksheets editable by making them named ranges (parameters). Items that you choose to make viewable, when you save to Excel Services, appear in the Parameters pane in Excel Web Access. You can change the values of these named ranges in the Parameters pane and refresh the workbook. You can also use the portal’s filter web part to filter several web parts (Excel Web Access and other types of web parts) together.However, you cannot use Excel Services to create new workbooks or to edit existing workbooks. To author a workbook for use with Excel Services, you can use Microsoft Excel 2013.

Excel Services also has a Web service. You can use Excel Web Services to load workbooks, set values in cells and ranges, refresh external data connections, calculate worksheets, and extract calculated results (including cell values, the entire calculated workbook, or a snapshot of the workbook). In SharePoint, you can also save, save a copy, and participate in collaborative editing sessions by using Excel Web Services.

Business Connectivity Services: The Business Data Connectivity (BDC or BCS) service application in SharePoint enables us to connect and manipulate with external line of business data sources such as SQL Server, web services, WCF Service, SOAP, REST Service Connection, XML file connection, oAuth and other proprietary data sources that are accessed by custom .NET assemblies from SharePoint. Using BDC, you can use SharePoint and Office clients as interfaces with data that doesn’t live in SharePoint. External content types are the core of BDC, It interacts with data through external content types which allows the interaction with external data in SharePoint lists.

Machine Translation Service: Machine Translation Service is a new service application in SharePoint that provides automatic machine translation of files and sites. When the Machine Translation Service application processes a translation request, it forwards the request to the Microsoft Translator cloud-hosted machine translation service, where the actual translation work is performed. This cloud-service also powers the Microsoft Office, Lync, Yammer and Bing translation features.

Managed Metadata Service: Metadata is information about information. For example, a book’s title and author is metadata. Metadata can be many kinds of information — a location, a date, or a catalog item number. When you use SharePoint products, you can manage the metadata centrally. You can organize the metadata in a way that makes sense in your business and use the metadata to make it easier to find what you want.

User Profile: The User Profile service stores information about users in a central location. It enables My Sites, social computing features such as social tagging and newsfeeds, and creating and distributing profiles across multiple sites and farms. It is also required by most SharePoint hybrid scenarios.

The User Profile service application in SharePoint Server provides a central location where service administrators configure and administer the following features:

  • User profiles– contain detailed information about people in an organization. A user profile organizes and displays all of the properties related to each user, together with social tags, documents, and other items related to that user.
  • Profile synchronization– provides a reliable way to synchronize groups and user profile information that is stored in the SharePoint Server profile database together with information that is stored in Active Directory Domain Services.
    In SharePoint Server 2013, you can synchronize directly with other directories across the enterprise.
    In SharePoint Server 2016, you can synchronize with other directories by using an external identity manager such as Microsoft Identity Manager 2016.
  • Audiences– enables organizations to target content to users based on their job or task, as defined by their membership in a SharePoint Server group or distribution list, by the organizational reporting structure, or by the public properties in their user profiles.
  • My Site Host– a dedicated site for hosting My Sites. A My Site Host is needed in order to deploy the social features of SharePoint Server.
  • My Site– a personal site that gives users in your organization a central location to manage and store documents, links, and information about colleagues.
  • Social tags and notes– enables users to add social tags to documents, to other SharePoint Server items, and to other items, such as external web pages and blog posts. Users can also leave notes on profile pages of a My Site or any SharePoint Server page. Administrators can delete all tags for employees when they leave the company or remove a tag they do not want.

These features make it possible for users in an organization to share information and to stay informed about what happens within the organization. Social tags, for example, enable users to tag and track the information in which they are most interested. Users can be alerted when people with which they work author new blog posts or when there is a change in organizational metadata.

Like other service applications in SharePoint Server, farm administrators can delegate the administration of all or part of the User Profile service application to one or more service application administrators. This enables the User Profile service application to be managed by the appropriate business group. One administrator can manage all areas of the User Profile service application or areas can be isolated and managed by different administrators. For example, one administrator can manage My Sites while a different administrator manages social tags and notes. The User Profile service application can be restricted and made available only to certain departments or sets of sites based on business need, security restrictions, and budgets.

User profile databases

When you create a User Profile service application, SharePoint Server creates three databases for storing user profile information and associated data:

  • Profile database– used to store user profile information.
  • Synchronization database– used to store configuration and staging information for synchronizing profile data from external sources such as the Active Directory Domain Services (AD DS).
  • Social tagging database– used to store social tags and notes created by users. Each social tag and note is associated with a profile ID.

Active Directory Import:

  • One way of import, you can’t export values to AD
  • It’s Fast then FIM’s two-way sync
  • Easy to configure.
  • You can schedule incremental every 5 min.
  • You can Apply the LDAP Filters to exclude the users from importing.
  • You can select which OU you want to import.

But you can’t import the Complex AD attribute with AD Import i.e Profile Picture.

If you want to import Profile picture then UPA Sync is the option.

  • It imports non user objects as well, like computer accounts.
  • If you have an OU which has both Computer & Users objects, then both are imported in UPA. However this is not the case with FIM based synchronization
  • If you select only few users under an OU, then import process does not bring in those users to UPA. It only imports all users in an OU & whole OU has to be selected.

SharePoint 2013 /2016: Active Directory Import and known behaviors

https://docs.microsoft.com/en-us/archive/blogs/spses/sharepoint-2013-active-directory-import-and-known-behaviors

SharePoint 2013 : ADImport is not cleaning up User Profiles in SharePoint whose AD Accounts are disabled

https://docs.microsoft.com/en-us/archive/blogs/spses/sharepoint-2013-adimport-is-not-cleaning-up-user-profiles-in-sharepoint-whose-ad-accounts-are-disabled

Search Service Application:

Listed below are the six components available in SharePoint 2013 search service:

  1. Crawl Component
  2. Content processing component
  3. Indexing component
  4. Query processing component
  5. Analytics processing component
  6. Search administration component

Now, let’s take a look on all these components separately …

1.Crawl Component :

This component takes care of crawling the content sources such as (SharePoint sites, websites & file shares etc…) and extracts the crawled properties and metadata and sends that to the content processing component.

  1. Content processing component:

This component receives the information from the crawl component and then processes and sends it to the indexing component. It also interacts with the analytics processing component and is responsible for mapping crawled properties to the managed properties.

  1. Indexing Component :

This component takes care of receiving the information from the content processing component and writes it to the search index. It also takes care of handling the queries and sends back the results to the Query processing component.

  1. Query Processing Component:

This component handles incoming query requests and sends them to the indexing component for results. It also takes care of query optimization.

  1. Analytics Processing Component :

This component takes care of analyzing what users are querying on and how they interact with the results.  This information is used to determine relevance, generate recommendations and also used for generating search reports.

  1. Search administration Component:

This component manages administrative processes as well as changes to the search topology, such as adding or removing search components and servers.

Please note that these 6 search components can be distributed across multiple servers to provide high availability as well as improve performance as shown in the image below.

Search service application databases:

  • Search Administration database :The Search Administration database hosts the Search service application configuration and handles crawl state orchestration, including the content source crawl history.
  • Analytics Reporting database :The Analytics Reporting database stores the results for usage analysis reports and extracts information from the Link database when needed.
  • Crawl Store database :The Crawl Store database stores the state of each crawled item and provides the crawl queue for items currently being crawled.
  • Link database :The Link database stores the information that is extracted by the content processing component and the click through information.

Secure Store service Application: The Secure Store Service is an authorization service that runs on SharePoint Server. The Secure Store Service provides a database that is used to store credentials. These credentials usually consist of a user identity and password, but can also contain other fields that you define. For example, SharePoint Server can use the Secure Store database to store and retrieve credentials for access to external data sources. The Secure Store Service provides support for storing multiple sets of credentials for multiple back-end systems.

  • Excel Online in Office Online Servercan use Secure Store to provide access to external data sources in workbooks published in SharePoint Server 2016. This can be used as a substitute to passing a user’s credentials to the data source, a process which often requires configuring Kerberos constrained delegation.
  • Excel Services in SharePoint Server 2013can use Secure Store to provide access to external data sources in published workbooks. This can be used as a substitute to passing a user’s credentials to the data source, a process which often requires configuring Kerberos delegation. Excel Services requires Secure Store if you want to configure an unattended service account for data authentication.
  • Visio Servicescan use Secure Store to provide access to external data sources in published data-connected diagrams. This can be used as a substitute to passing a user’s credentials to the data source, a process which often requires configuring Kerberos constrained delegation. Visio Services requires Secure Store if you want to configure an unattended service account for data authentication.
  • PerformancePoint Servicescan use Secure Store to provide access to external data sources. PerformancePoint Services requires Secure Store if you want to configure an unattended service account for data authentication.
  • Power Pivotrequires Secure Store for scheduled refresh of PowerPivot workbooks.
  • Microsoft Business Connectivity Servicescan use Secure Store to map the user’s credentials to a set of credentials for an external system. You can either map each user’s credentials to a unique account on the external system or you can map a set of authenticated users to a single group account. Business Connectivity Services can also use Secure Store to store certificates for accessing an on-premises data source from SharePoint in Microsoft 365.
  • SharePoint runtimecan use Secure Store to store credentials necessary to communicate with Azure services, if any of the user apps require SharePoint runtime to provision and use Azure Services.

The Security Token Service is not available (SharePoint Server)

https://docs.microsoft.com/en-us/sharepoint/technical-reference/the-security-token-service-is-not-available

Get-SPSecurityTokenServiceConfig

https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/get-spsecuritytokenserviceconfig?view=sharepoint-ps

Power BI 101 – Log Files and Tracing

Symptoms

When you run Microsoft SharePoint Foundation 2013 with Service Pack 1 Setup, SharePoint Server 2013 with Service Pack 1 Setup, or Project Server 2013 with Service Pack 1 Setup on a computer that has the Microsoft .NET Framework 4.6, 4.6.1, or 4.6.2 installed, you receive the following error message:

Setup is unable to proceed due to the following error(s): This product requires Microsoft .Net Framework 4.5.

Cause

This problem occurs because the SharePoint Setup and Project Server Setup programs do not recognize the .NET Framework 4.6, 4.6.1, or 4.6.2 as a supported version of the .NET Framework.

Resolution

To resolve this problem, follow these steps:

  1. Extract the installation media to a writable location.
    • If your installation media is an executable file (.exe), extract the files and folders from the executable file to a writable location by running the following command at a command prompt:
      <executable file name> /extract:<path to writable location>
      

      For example, run the following command:

      sharepoint.exe /extract:C:\SharePointInstaller
    • If your installation media is an ISO or IMG disc image (.iso or .img), mount the disc image, and then copy the files and folders from the disc image to a writable location.
  2. Download the compressed (.zip) file that contains the fix that matches the product you’re installing:
  3. Open the .zip file.
  4. Copy the following Setup support file, as appropriate, from the .zip file into the “updates” folder in your writable location.
    • SharePoint Foundation 2013 with Service Pack 1: wsssetup.dll
    • SharePoint Server 2013 with Service Pack 1: svrsetup.dll
    • Project Server 2013 with Service Pack 1: svrsetup.dll
  5. Run Setup.exe from the writable location to start SharePoint Setup or Project Server Setup. Setup will use the support file that contains the fix that you’ve copied into the “updates” folder.

Workaround

If you can’t use the fix method that’s provided in the “Resolution” section, an alternative workaround method is available.

To work around this problem, make sure that the .NET Framework 4.6, 4.6.1, or 4.6.2 is not installed when you run SharePoint Setup.

If the Microsoft .NET Framework 4.6, 4.6.1, or 4.6.2 is already installed, follow these steps:

  1. Uninstall the .NET Framework 4.6, 4.6.1, or 4.6.2. To do this, go to the location that is specific to your operating system as listed in the following articles in the Microsoft Knowledge Base:
    • 3151800 The .NET Framework 4.6.2 offline installer for Windows
    • 3102436 The .NET Framework 4.6.1 offline installer for Windows
    • 3045557 Microsoft .NET Framework 4.6 (Offline Installer) for Windows

    Note In Windows Server 2012 or Windows Server 2012 R2, the .NET Framework is an operating system component and cannot be independently uninstalled. Updates to the .NET Framework appear in the Installed Updates tab of the Control Panel Programs and Features app. For operating systems on which the .NET Framework is not preinstalled, the .NET Framework appears in the Uninstall or change a program tab (or the Add/Remove programs tab) of the Program and Features app in Control Panel. See Troubleshooting Blocked .NET Framework Installations and Uninstallations and the Microsoft Knowledge Base articles listed earlier for more information.

  2. Restart the computer.
  3. Install the web installer for the .NET Framework 4.5.2.
  4. Run SharePoint Setup to install SharePoint.
    After SharePoint is installed successfully, you can upgrade from the .NET Framework 4.5.2 to the .NET Framework 4.6, 4.6.1, or 4.6.2.

More Information

Although you receive the error message during installation, SharePoint Foundation 2013 and SharePoint Server 2013 are still supported after you upgrade to the .NET Framework 4.6, the .NET Framework 4.6.1, or the .NET Framework 4.6.2.

Note Formal support for the .NET Framework 4.5.1, 4.5, and 4.0 ended in January 2016.

Power BI

Posted: August 25, 2020 in PowerBI

Power BI is a Data Visualization and Business Intelligence tool that converts data from different data sources to interactive dashboards and BI reports. Power BI suite provides multiple software, connector, and services.

Power BI desktop app is used to create reports, while Power BI Services (Software as a Service – SaaS) is used to publish the reports, and Power BI mobile app is used to view the reports and dashboards.

Power BI includes the following components −

  • Power BI Desktop − This is used to create reports and data visualizations on the dataset.
  • Power BI Gateway − You can use Power BI on-premises gateway to keep your data fresh by connecting to your on-premises data sources without the need to move the data. It allows you to query large datasets and benefit from the existing investments.
  • Power BI Mobile Apps − Using Power BI mobile apps, you can stay connected to their data from anywhere. Power BI apps are available for Windows, iOS, and Android platform.
  • Power BI Service − This is a cloud service and is used to publish Power BI reports and data visualizations.

Power BI supports large range of data sources. You can click Get data and it shows you all the available data connections. It allows you to connect to different flat files, SQL database, and Azure cloud or even web platforms such as Facebook, Google Analytics, and Salesforce objects. It also includes ODBC connection to connect to other ODBC data sources, which are not listed.

Following are the available data sources in Power BI −

  • Flat Files
  • SQL Database
  • OData Feed
  • Blank Query
  • Azure Cloud platform
  • Online Services
  • Blank Query
  • Other data sources such as Hadoop, Exchange, or Active Directory

To get data in Power BI desktop, you need to click the Get data option in the main screen. It shows you the most common data sources first. Then, click the More option to see a full list of available data sources.

Available Data Sources

When you click “More..” tab as shown in the above screenshot, you can see a new navigation window, where on the left side it shows a category of all available data sources. You also have an option to perform a search at the top.

More

Following are the various data sources listed −

All

Under this category, you can see all the available data sources under Power BI desktop.

File

When you click File, it shows you all flat file types supported in Power BI desktop. To connect to any file type, select the file type from the list and click Connect. You have to provide the location of the file.

File

Database

When you click the Database option, it shows a list of all the database connections that you can connect to.

Database

To connect to any database, select a Database type from the list as shown in the above screenshot. Click Connect.

You have to pass Server name/ User name and password to connect. You can also connect via a direct SQL query using Advance options. You can also select Connectivity mode- Import or DirectQuery.

Note − You can’t combine import and DirectQuery mode in a single report.

Import vs DirectQuery

DirectQuery option limits the option of data manipulation and the data stays in SQL database. DirectQuery is live and there is no need to schedule refresh as in the Import method.

Import method allows to perform data transformation and manipulation. When you publish the data to PBI service, limit is 1GB. It consumes and pushes data into Power BI Azure backend and data can be refreshed up to 8 times a day and a schedule can be set up for data refresh.

Import Method

Advantages of Using DirectQuery

  • Using DirectQuery, you can build data visualizations on large datasets, which is not feasible to import in Power BI desktop.
  • DirectQuery doesn’t apply any 1GB data set limit.
  • With the use of DirectQuery, the report always shows current data.

Limitations of Using DirectQuery

  • There is a limitation of 1 million row for returning data while using DirectQuery. You can perform aggregation of more number of rows, however, the result rows should be less than 1 million to return the dataset.
  • In DirectQuery, all tables should come from a single database.
  • When a complex query is used in the Query editor, it throws an error. To run a query, you need to remove the error from the query.
  • In DirectQuery, you can use Relationship filtering only in one direction.
  • It doesn’t support special treatment for time-related data in tables.

Azure

Using the Azure option, you can connect to the database in Azure cloud. Following screenshot shows the various options available under Azure category.

Azure

Online Services

Power BI also allows you to connect to different online services such as Exchange, Salesforce, Google Analytics, and Facebook.

Following screenshots shown the various options available under Online Services.

Connect Online ServicesOnline Services

Other

Following screenshot shows the various options available under other category.

Other Category

Power BI – Comparison with Other BI Tools:

Power BI vs Tableau

Tableau is considered as one of the leading tools in the BI market. Power BI is considered as an emerging tool in close competition with Tableau because of its backend data manipulation features and connectivity with the list of data sources. Tableau is one of the best data visualization tools in the market and is used by medium and large enterprises. Power BI is closely integrated with Office 365 suite, and hence it is compatible other sources such as SharePoint.

Feature Tableau Power BI
Data Visualization Tableau provides strong data visualization and is one of the main data visualization tool in the market. Power BI provides a strong backend data manipulation feature with access to simple visualizations.
Size of Dataset Tableau can connect much larger datasets as compared to Power BI. Power BI has a limit of 1GB data in free version.
Data Sources Tableau covers a vast range of data sources to connect with for data visualization. In Tableau, you select the dataset first and visualizations are used on the fly. Power BI covers most of the data sources available in Tableau. It is closely integrated with Office 365, hence provides connectivity to SharePoint.

Power BI online version also supports direct visualization on Search Engine, though, only Bling is supported at this point.

Costing Tableau is expensive as compared to Power BI but still under budget for small and medium enterprise. Power BI provides a free version with 1GB limit on dataset. Power BI Pro is also a cheaper solution when compared with any other BI tool.
License and Pricing Tableau Desktop Profession: USD70/user/month and it can connect to hundreds of data sources.

Tableau Desktop Personal: USD35/user/month and it can connect to data sources such as Google Sheets and Excel files.

Tableau Server: Minimum 10 users with the cost of USD35/user/month

Tableau Online with private cloud: USD 42/user/month

Power BI: Free

1 GB storage

10k rows/hour data streaming

Power BI Pro:

USD9.99/user/month

10 GB storage

1 million rows/hour

Implementation Tableau provides different implementation types as per organizational needs panning from few hours to few weeks. Power BI uses cloud storage and includes simple implementation process.

Power BI vs SSRS

Feature SSRS Power BI
Data Visualization SSRS is mostly used for Pixel perfect reporting and average dash-boarding features. Power BI provides a strong backend data manipulation feature with access to simple visualizations.
Size of Dataset No such limit in SSRS. It can connect to much larger datasets as compared to Power BI. Power BI has a limit of 1GB data in free version.
Data Sources SSRS covers a vast range of data sources to connect with for BI reporting. Power BI covers most of the data sources available in Tableau. It is closely integrated with Office 365, hence provides connectivity to SharePoint.

Power BI online version also supports direct visualization on Search Engine, though, only Bling is supported at this point.

Costing SSRS pricing details are available only upon request. Power BI provides a free version with 1GB limit on dataset. Power BI Pro is also a cheaper solution when compared with any other BI tool.
License and Pricing SQL Server Enterprise License. It is available on cloud – AWS, Azure, and other providers. Power BI: Free

1 GB storage

10k rows/hour data streaming

Power BI Pro:

USD9.99/user/month

10 GB storage

1 million rows/hour

Implementation SSRS implementation is complex as compared with Power BI. Power BI uses cloud storage and includes simple implementation process.

Power BI – Data Modeling

Using Data Modeling and Navigation

Data Modeling is one of the features used to connect multiple data sources in BI tool using a relationship. A relationship defines how data sources are connected with each other and you can create interesting data visualizations on multiple data sources.

With the modeling feature, you can build custom calculations on the existing tables and these columns can be directly presented into Power BI visualizations. This allows businesses to define new metrics and to perform custom calculations for those metrics.

Modeling Feature

In the above image, you can see a common data model, which shows a relationship between two tables. Both tables are joined using a column name “Id”.

Similarly, in Power BI, you set the relationship between two objects. To set the relationship, you have to drag a line between the common columns. You can also view the “Relationship” in a data model in Power BI.

To create data model in Power BI, you need to add all data sources in Power BI new report option. To add a data source, go to the Get data option. Then, select the data source you want to connect and click the Connect button.

Data Model in Power BI

Once you add a data source, it is presented on the right side bar. In the following image, we have used 2 xls file to import data – Customer and Product.

Add Data Source

In Power BI on the left side of the screen, you have the following three tabs −

  • Report
  • Data
  • Relationships

Power BI Screen

When you navigate to the Report tab, you can see a dashboard and a chart selected for data visualization. You can select different chart types as per your need. In our example, we have selected a Table type from available Visualizations.

Report Tab

When you go to the Data tab, you can see all the data as per the defined Relationship from the data sources.

Data Tab

In the Relationship tab, you can see the relationship between data sources. When you add multiple data sources to Power BI visualization, the tool automatically tries to detect the relationship between the columns. When you navigate to the Relationship tab, you can view the relationship. You can also create a Relationship between the columns using Create Relationships option.

Relationship Tab

You can also add and remove relationships in data visualization. To remove a relationship, you have to right-click and select the “Delete” option. To create a new “Relationship”, you just need to drag and drop the fields that you want to link between the data sources.

Relationships

You can also use the Relationship view to hide a particular column in the report. To hide a column, right-click on the column name and select the “Hide in report view” option.

Relationship View

Creating Calculated Columns

You can create calculated columns in Power BI by combining two or more elements of the existing data. You can also apply calculation on an existing column to define a new metric or combine two columns to create one new column.

You can even create a calculated column to establish a relationship between the tables and it can also be used to setup a relationship between two tables.

To create a new calculated column, navigate to Data View tab on the left side of the screen and then click Modeling.

New Calculated Column

When you navigate to the Modeling tab, you can see a New Column option at the top of the screen. This also opens the formula bar, where you can enter DAX formula to perform calculation. DAX- Data Analysis Expression is a powerful language also used in Excel to perform calculations. You can also rename the column by changing the Column text in the formula bar.

Modeling Tab

In the following example, let us create a new column: Product Code (Product_C), which is derived from the last three characters of Prod_Id column. Then, write the following formula −

Product_C = RIGHT( Sheet1[Prod_Id],3)

Create New Column

A long list of formulas is also provided that you can use for creating calculated columns. You have to enter the first character of formula to be used in calculations as shown in the following screenshot.

Creating Calculated Columns

Creating Calculated Tables

You can also create a new calculated table in data modeling in Power BI. To create a new table, navigate to the Data View tab on the left side of the screen, and then go to the Modeling option at the top of the screen.

Modeling Option

DAX expression is used to create the new table. You have to enter the name of a new table on the left side of the equal sign and DAX formula to perform the calculation to form that table on the right. When the calculation is complete, the new table appears in the Fields pane in your model.

In the following example, let us define a new table – Table_CustC that returns a one column table containing unique values in a column in another table.

Table_CustC

A new table is added under the “Fields” section in Power BI screen as shown in the following screenshot. Once the calculated column and calculated tables are created as per your requirement, you can use the fields in the Report tab in Power BI.

To add these objects, you have to select a checkbox and a relationship is automatically detected if possible. If not, then you can drag the columns that you want to connect.

Select Checkbox

To view the report, you navigate to the Report tab and you can see both “Calculated columns” and fields from the new “Calculated table” in the report view.

Calculated Columns

Managing Time-Based Data

Power BI allows to drill through time-based data by default. When you add a date field in your analysis and enable drill on your data visualization, it takes you to the next level of time-based data.

Let us consider we have added Time-based table in Power BI visualization. We have added Revenue and Year column in our report.

Revenue ColumnYear Column

We can enable the drill feature in visualizations using the option at the top. Once we enable the drill feature and click the bars or lines in the chart, it drills down to the next level of time hierarchy. Example: Years → Quarters → Months.

We can also use Go to the next level in the hierarchy option to perform a Drill.

Hierarchy Option

Power BI – Dashboard Options

Exploring Different Datasets

Power BI tool provides a lot of options to explore the datasets. When you are working on your BI report or dashboards, you can use Power BI look for quick insights. Navigate to the datasets section on the left side of the tool UI, click the 3 dots (…) and click Get Insights.

Insights

When you select the Get Insights option, it runs all the algorithms in your dataset and once it is complete, you get a notification that insight is ready for your dataset.

Get Insights Option

You can click the View Insights option and the tool will show you all chart representations of your data insights. You can any time go to this option and check insights option in your dataset.

When you publish a report to Power BI service, you also get an option of Quick Insight on the first page.

Report Power BI ServiceQuick Insight

Creating Dashboards

In Power BI, you can create a dashboard by pinning visualizations from BI reports that are published using Power BI desktop. All the visualizations that are created using Power BI service are also available for pinning to create dashboards.

In Power BI, if you want to pin a visual, open the BI report on the Power BI service. At the top of the visual, select the pin icon.

Power BI Service

When you use the Pin option as shown as shown in the above screenshot, a new dialog box appears as shown in the following screenshot. It asks you to create a new dashboard or select an existing dashboard to put the visual from the dropdown list. If you don’t have an existing dashboard, then this option is greyed out.

Greyed Out

Once you click the Pin button, you will get a confirmation that your visualization is “Pinned” to the dashboard. You can click My Workspace and check the dashboard.

Once your dashboard is created, you can use different options to configure the dashboard.

Pinned

Sharing Dashboards

When you publish your BI report to Power BI service, you can share reports and dashboards with other users in your organization. Sharing a dashboard is very easy in Power BI.

You have to open the dashboard in Power BI service and click the Share option at the top right corner of the screen.

Dashboard Power BI Service

The sharing feature is only available with Power BI Pro version. You can also use the 60-days free trial for Power BI Pro as shown in the following screenshot.

Free Trial

Click the Try Pro for free to start a trial. Select the Start Trial and Finish, and you will get a confirmation that 60-days trial has started. When you click the Share dashboard, you will get options in a new window. You have to enter the email Id of the user with whom you want to share this dashboard.

You can allow recipients to share the dashboard with other users or send email notifications. You can also provide a direct URL to users and they can access the dashboard directly.

URL to Users

Tiles in Dashboard

When you check More Options in the dashboard, you can see an option of Focus Mode and other different options in the dashboard.

Focus Mode is used to take a closer look at your dashboard data. When you have multiple values in the dashboard, you can use the Focus Mode for a better view of the objects in the dashboard. If there are any columns, which are not shown due to space issues, you can also view those using the Focus Mode.

Focus Mode

Focus Mode is used to see all the data in the dashboard/report. It is also possible to pin the visual directly from Focus Mode to a different dashboard by selecting the Pin icon.

To exit the Focus Mode, you can select the Exit Focus Mode option.

Exit Focus Mode Option

You can also use the Tile Details option to edit few formatting changes. This option allows to change the tile’s title, subtitle, last refresh time and date, and other details, such as creating a custom link for your dashboard.

Tile Details OptionCustom Link

Data Gateway

You can connect on-premise data sources to Power BI service using a data gateway. You can also use a version of data gateway that doesn’t include any administration configuration and it is called as Personal Gateway.

You can set up Personal Gateway by logging into Power BI service. You have to select the download icon on the top right hand corner of the screen and click Data Gateway.

Personal Gateway

As per Power BI official site, using Data Gateway with the on-premises gateways, you can keep your data fresh by connecting to your on-premises data sources without the need to move the data. Query large datasets and benefit from your existing investments. The gateways provide the flexibility you need to meet individual needs, and the needs of your organization.

Power BI Official Site

To set up download gateways, you have to run the setup till it is downloaded and the installation wizard is complete.

Download Gateways

You have an option to select either −

  • On-premise data gateway or
  • Personal gateway (Power BI only)

Once you launch Power BI Gateway, you have to login to Power BI gateway service.

You can also enable automatic updates by navigating to Schedule Refresh and frequency of the schedule.

Power BI – Visualization Options

Creating Simple Visualizations

Visualizations are used to effectively present your data and are the basic building blocks of any Business Intelligence tool. Power BI contains various default data visualization components that include simple bar charts to pie charts to maps, and also complex models such as waterfalls, funnels, gauges, and many other components.

Business Intelligence Tool

In Power BI, you can create visualization in two ways. First is by adding from the right side pane to Report Canvas. By default, it is the table type visualization, which is selected in Power BI. Another way is to drag the fields from right side bar to the axis and value axis under Visualization. You can add multiple fields to each axis as per the requirement.

Report Canvas

In Power BI, it is also possible to move your visualization on the reporting canvas by clicking and then dragging it. You can also switch between different type of charts and visualizations from the Visualization pane. Power BI attempts to convert your selected fields to the new visual type as closely as possible.

Creating Map Visualizations

In Power BI, we have two types of map visualization – bubble maps and shape maps. If you want to create a bubble map, select the map option from the visualization pane.

Create Bubble Map

To use a bubble map, drag the map from Visualizations to the Report Canvas. To display values, you have to add any location object to the axis.

Display Values

In the value fields, you can see that it accepts values axis such as City and State and or you can also add longitude and latitude values. To change the bubble size, you need to add a field to the value axis.

You can also use a filled map in data visualization, just by dragging the filled map to the Report Canvas.

Filled Map

Note − If you see a warning symbol on top of your map visualization, it means that you need to add more locations to your map chart.

Using Combination Charts

In data visualization, it is also required to plot multiple measures in a single chart. Power BI supports various combination chart types to plot measure values. Let us say you want to plot revenue and unit_solds in one chart. Combination charts are the most suitable option for these kind of requirement.

One of the most common Combination chart in Power BI is Line and Stacked column charts. Let us say we have a revenue field and we have added a new data source that contains customer-wise unit quantity and we want to plot this in our visualization.

Combination Chart

Once you add a data source, it will be added to the list of fields on the right side. You can add units to the column axis as shown in the following screenshot.

Data Source

You have other type of combine chart that you can use in Power BI – Line and Clustered Column.

Line and Clustered Column

Using Tables

In Power BI, when you add a dataset to your visualization, it adds a table chart to the Report canvas. You can drag the fields that you want to add to the report. You can also select the checkbox in front of each field to add those to the Report area.

With the numerical values in a table, you can see a sum of values at the bottom.

Numerical Values

You can also perform a sort in the table using an arrow key at the top of the column. To perform ascending/descending sort, just click the arrow mark, and the values in the column will be sorted.

Ascending Descending Sort

The order of the columns in a table is determined by the order in the value bucket on the right side. If you want to change the order, you can delete any column and add the other one.

Delete Any Column

You can also undo summarize or apply different aggregate function on numerical values in the table. To change the aggregation type, click the arrow in the value bucket in front of the measure and you will see a list of formulas that can be used.

Aggregation Type

Another table type in Power BI is the matrix table that provides a lot of features such as auto sizing, column tables, and setting colors, etc.

Matrix Table

Modify Colors in Charts

In Power BI, you can also modify the colors in the chart. When you select any visualization, it has an option to change the color. Following options are available under the Format tab −

  • Legend
  • Data Colors
  • Detail Label
  • Title
  • Background
  • Lock Aspect
  • Border
  • General

To open these options, go to the Format tab as shown in the following screenshot. Once you click, you can see all the options available.

Format Tab

When you expand the Legend field, you have an option where you want to display the legend. You can select −

  • Position
  • Title
  • Legend Name
  • Color
  • Text Size
  • Font Family

Legend Field,

Similarly, you have data colors. In case, you want to change the color of any data field, you can use this option. It shows all objects and their corresponding colors in the chart.

Data Colors

You also have Analytics feature in the tool, where you can draw lines as per requirement in data visualization. You have the following line types in data visualization −

  • Constant Line
  • Min Line
  • Max Line
  • Average Line
  • Median Line
  • Percentile Line

Analytics Feature

You can opt for a dashed, dotted, or a solid line. You can select Transparency level, color, and position of the line. You can also switch on/off data label for this line.

Data Label

Adding Shapes, Images and Text box

Sometimes it is required that you need to add static text, images, or shapes to your visualization. In case you want to add header/footer or any static signatures, messages to data visualization this option can be used.

You can also add URLs in the text box and Power BI uses those link to make it live.

To add shapes, images and text box, navigate to the Home tab and at the top you will find an option to add images.

Home Tab

You can insert different shapes in data visualization. To see the available shapes, click the arrow next to the Shapes button.

Insert Shapes

When you click on the text box, it adds a text box in your Report canvas. You can enter any text in the text box and use the rich text editor to make formatting changes.

Text Box

Similarly, images can be added to data visualization to add logos or other images to data visualization. When you click the Image option, it asks for a path to pass the image file.

You can add shapes by selecting any shape from the dropdown list. You can also resize it using different options.

Selecting Any Shape

Styling Reports

In Power BI, you have flexible options to adjust the page layout and formatting such as orientation and page size of your report. Navigate to Page View menu from the Home tab and the following options are provided.

  • Fit to Page
  • Fit to Width
  • Actual Size

Flexible Options

By default, the page size in a report is 16:9; however, it is also possible to change the page size of the report. To change the page size, navigate to the Visualization pane and select Paint brush.

Note − To change page size, no visualization should be added to the Report canvas. You have the following options available under Page layout −

  • Page Information
  • Page Size
  • Page Background

Under Page Information, you have Name and Q&A.

Under Page Size, you can select from the following options −

  • Type
  • Width
  • Height

Under Page Size

Under Page Background, you can select from the following options:

  • Color
  • Transparency
  • Add Image

Under Page Background

Duplicating Reports

In some scenarios, you may want to use the same layout and visuals for different pages. Power BI provides an option to create a copy of the page. When you use Duplicate Page option, a new page is added with similar layout and visuals.

To duplicate a page, right-click the Page and select Duplicate Page option. This will create a copy of the same page with the name – Duplicate of Page1.

Duplicate Page Option

Now, if you want to rename an existing page or delete a page, you can use other options as shown in the above screenshot.

Power BI – Excel Integration

Using Excel Data

Using Power BI, you can also import Excel workbook file from the local drive into Power BI. To import data from the excel sheet, you have to ensure that each column has a proper name. To import an Excel file in Power BI, navigate to Get Data → Files → Local Files.

Import Excel File

Importing xls Files

In Power BI Service, navigate to My Workspace → File → Local File.

My Workspace

Also note that it is not necessary your Excel file should only be saved on the Local Drive. You can also import an Excel workbook from OneDrive or even from SharePoint.

Once the dataset is imported, you are ready to create the reports in Power BI. Imported dataset is available under “DATASETS” option in Power BI menu.

Double-click Datasets. Then, navigate to the Explore tab. This will open a new Report Canvas. All the fields from your table and corresponding columns are available under the Fields option on the right side of the screen.

Double-click Datasets

To create a report, select any visualization and add the fields from the table to visualization.

Sharing Power BI Dashboards

Using Power BI Desktop for Report Sharing

Once BI reports are created in Power BI desktop, you can also share the reports with other business users. All BI reports, dashboards, and data can be shared with other colleagues and business users in the organization.

You can share reports using the following methods −

  • Publish reports using Power BI Service
  • Content Packs combine dashboard, report, and datasets obtained in BI desktop tool
  • Create Groups and assign specific rights to different users for report sharing
  • Use Power BI mobile apps to access share dashboards and reports

Let us see how to publish a BI report using Power BI desktop tool.

Once the report is created, navigate to the Publish button on the Home tab in Power BI desktop.

Publish BI Report

Once you select the Publish service, your visuals, custom measures and reports are all packaged and published to Power BI service. Power BI files have an extension .pbix files. When the upload is in process, you get a dialog box that Publishing is in process.

Publish Service

Once the upload is complete, you will get a confirmation message announcing the “Success”. You can also view Quick Insights and open the shared report from the dialog box.

Confirmation Message

Printing Power BI Dashboards

It is also required sometimes to take printouts of your reports and dashboards. With Power BI, you can take prints of your BI reports and dashboards. To take a Printout of the report, navigate to Power BI service and click the “…” option.

Reports and Dashboards

It will open a Print dialog box. You can select the Printer on which you want to take the printout of the report. You can also select different Print options such as Portrait/Landscape, Margins, Header or Scale.

Print Dialog Box

Export Options

In Power BI, you can also use different Export options to export data from BI report. To use the export option, navigate to Power BI service and select the BI report you want to export.

BI Report Export

When you click the Export to option, it generates a CSV file. In Power BI, you can also export/view a report directly by navigating to File → Print option.

CSV File

Publishing Report to Web

In Power BI, it is also possible to publish a BI report to web or share it via email. To publish a report to the web, you have to navigate to Power BI service → My Workspace.

Publishing Report to Web

Once you open the report that you want to publish, navigate to the File tab → Publish to Web. Once you select this option, it opens a new dialog that creates an embed code for this report to include in the website or email.

Option says: Get a link or embed code that you can include on a public website. You may use publish to web functionality to share content on a publicly available website. You may not use this functionality to share content internally, which includes through your email, your internal network, or intranet site. Publish a live version that will remain synchronized with the source report in Power BI. Any changes you make to the report will immediately be reflected in the published public version.

Publish to Web

When you select – Create Embed code, Power BI prompts that you want to share your data with everyone on the internet.

The following message is displayed: You are about to create an embed code for this report. Once published, anyone on the Internet will be able to access the report and the data it contains, and Microsoft may display the report on a public website or a public gallery.

Before publishing this report, ensure you have the right to share the data and visualizations publicly. Do not publish confidential or proprietary information, or an individual’s personal data. If in doubt, check your organization’s policies before publishing.

Note − You can publish the report as a web page and any user with the link can view it. The link can be sent via email or it can be used as an iframe in a web page.

Sent Via Email

Deleting an Embed Code

Let us say, you want to delete an embed code. Navigate to the Gear icon at the top of the screen as shown in the following screenshot. Then go to Manage Embed codes.

Deleting Embed Code

To remove an embed code click the ellipsis mark (…) in front of the report name and select the Delete option.

Ellipsis Mark

When you click the Delete option, it will ask you if you want to delete publish to web code. Once you are sure, click Delete.

Delete Publish Web Code

Using Content Pack

In Power BI, you can also share dashboard, report, and dataset as a package with your colleagues. To create a content pack, click the Gear box icon in Power BI workspace as shown in the following screenshot.

Using Content Pack

Once you select Create content pack, you will be prompted with a new dialog box. You can choose if you want to distribute this content pack with Specific Groups or My Entire Organization.

If you want to share this with specific people, you have to enter email addresses. You can also add a Title and description of the content pack as shown in the following screenshot.

Email Addresses

At the bottom of the page, you have an option to select the components you want to publish. You can select from the following −

  • Dashboards
  • Reports
  • Datasets

Select Components Publish

Editing Content Pack

When a content pack is created, you can also go back and edit the shared objects of the content pack. Whenever you update any dashboard, BI report, you are prompted if you want to update the shared content.

Click the Gear box icon under My Workspace → View Content Pack.

Editing Content Pack

If you see a small icon in front of the name of the content pack, it shows that the content pack is updated. When you select the edit button, you will reach the home screen, where you can create a new content pack.

Create New Content Pack

Power BI accepts all the changes you make to the content pack and publishes the updated content pack to the content pack gallery.

DAX Basics in Power BI

DAX Introduction

DAX (Data Analysis Expressions) is a formula expression language and can be used in different BI and visualization tools. DAX is also known as function language, where the full code is kept inside a function. DAX programming formula contains two data types: Numeric and Other. Numeric includes – integers, currency and decimals, while Other includes: string and binary object.

Following is an example of DAX formula, which uses a function to calculate a column in a table.

DAX Formula

DAX function can also include other functions, conditional statements, and value references.

DAX Functions

In Power BI, you can use different function types to analyze data, and create new columns and measures. It includes functions from different categories such as −

  • Aggregate
  • Text
  • Date
  • Logical
  • Counting
  • Information

Power BI provides an easy way to see the list of all functions. When you start typing your function in the formula bar, you can see the list of all functions starting with that alphabet.

All Functions

Aggregate Functions

DAX has a number of aggregate functions.

  • MIN
  • MAX
  • Average
  • SUM
  • SUMX

Counting Functions

Other counting functions in DAX include −

  • DISTINCTCOUNT
  • COUNT
  • COUNTA
  • COUNTROWS
  • COUNTBLANK

Logical Functions

Following are the collection of Logical functions −

  • AND
  • OR
  • NOT
  • IF
  • IFERROR

TEXT Functions

  • REPLACE
  • SEARCH
  • UPPER
  • FIXED
  • CONCATENATE

DATE Functions

  • DATE
  • HOUR
  • WEEKDAY
  • NOW
  • EOMONTH

INFORMATION Functions

  • ISBLANK
  • ISNUMBER
  • ISTEXT
  • ISNONTEXT
  • ISERROR

DAX Calculation Types

In Power BI, you can create two primary calculations using DAX −

  • Calculated columns
  • Calculated measures

When you navigate to the Modeling tab, you can see a New Column option at the top of the screen. This also opens the formula bar where you can enter DAX formula to perform the calculation. DAX – Data Analysis Expression is a powerful language used in Excel to perform calculations. You can also rename the column by changing the Column text in the formula bar.

Excel to Perform Calculations

In the following example, we have created a new column: Product Code (Product_C), which is derived from the last 3 characters of Prod_Id column. Following is the formula −

Product_C = RIGHT( Sheet1[Prod_Id],3)

To create a calculated measure, navigate to New Measure tab under Modeling. This will add a new object under the Fields tab with the name Measure.

Create Calculated MeasureNew Measure Tab

You can write DAX formula to calculate the value of the new measure, as we did for the new calculated column.

Power BI – Administration Role

Power BI administration role is assigned to those who require admin privilege on BI Admin portal, without granting Office 365 access.

To provide admin access, navigate to Office 365 Admin Center, select Users and then Active Users.

Navigate to the Roles tab and click the Edit option.

Roles Tab

Navigate to the Customized Administrator tab and select Power BI Service Administrator.

Customized Administrator Tab

Purchasing

Power BI is a newly designed tool from Microsoft, which consists of the following components −

  • Power BI Desktop
  • Power BI Service
  • Connector Gateway

Power BI desktop is a free tool that can be installed from the Microsoft site without any additional cost.

https://powerbi.microsoft.com/en-us/pricing/

Power BI Desktop Free Tool

This is the link to directly download Power BI files −

https://www.microsoft.com/en-us/download/details.aspx?id=45331

Download Power BI FilesChoose the Download

Power BI Pro has 60-days free trial and then it can be purchased for 9.99$/user/month. Power BI Premium is as per the capacity pricing per node/month.

Power BI also provides on-premise report server, which can be used for publishing a report with the flexibility to move to the cloud environment later.

https://powerbi.microsoft.com/en-us/report-server/

On-premise Report Server

A trial version is also available for Power BI Pro Report Server and as per the company website – Power BI Report Server provides access to data and insights, and the enterprise reporting capabilities of SQL Server Reporting Services in a modern, on-premises solution.

It assists in visually exploring data and quickly discovering patterns to make better, faster decisions. At the same time, it generates precisely formatted reports based on the business needs. You’ll also be able to confidently scale to thousands of users as Power BI Report Server is based on a proven, enterprise-grade platform.

REST API

In Power BI, it is also possible to push data in real time using REST APIs. With Power BI REST API, you can create data sets, dashboards, add and delete rows and get groups.

A Power BI REST API can be created using any of the following technologies −

  • .NET
  • JQuery
  • Ruby

To authenticate Power BI, you need to get an Azure Active Directory token and this can allow your app to access Power BI dashboards.

Following is the C# code to get an authorization code from Azure AD in Power BI service.

Azure AD Power BI Service

Security

Azure Active Directory (AAD) authentication is used in Power BI when a user authenticates using Power BI service. Power BI login credentials can be an email account used by users to set up their BI account and is an effective username.

Power BI provides security level used by Azure cloud that includes the following level of security −

  • Multitenant Environment Security
  • Networking Security
  • AAD based Security

For data storage, there are two different repositories used in Power BI −

  • Azure BLOB
  • Azure SQL Database

Azure BLOB storage is used for data uploaded by users and Azure SQL database is used to store system data. Power BI security is mostly based on data and network security features available in Azure cloud and authentication is also based on Azure AD.

Ref: https://www.tutorialspoint.com/power_bi/index.htm

 

Flush the blob cache

Posted: August 25, 2020 in SharePoint On Premise

What is blob cache: A BLOB cache is a disk-based cache that stores binary large objects (BLOBs) such as frequently used image, audio, and video files, and other files that are used to display web pages. Each SharePoint front-end server maintains its own BLOB cache. When you enable a BLOB cache, you specify the file types to include in the cache and also the location of the BLOB cache. The first time that a BLOB file is requested, the file is copied from the database to the BLOB cache on the front-end server. Future requests to the front-end server for that same file are then served from the file that is stored in the BLOB cache, instead of being served from the database. This reduces the network traffic and the load on the database server.

Flush the blob cache:

1. Verify that you have the following memberships:

  • securityadmin fixed server role on the SQL Server instance.
  • db_owner fixed database role on all databases that are to be updated.
  • Administrators group on the server on which you are running PowerShell cmdlets.
  • Add memberships that are required beyond the minimums above.
  • An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint Server cmdlets.

2. Execute the following PS commands.

$webApp = Get-SPWebApplication “<WebApplicationURL>”
[Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
Write-Host “Flushed the BLOB cache for:” $webApp