Copilot for Power BI, What Does it Mean for Power BI Development?

Copilot for Power BI, What Does it Mean for Power BI Development?

AI and ML have come a long way in the past decade, transforming how we develop software and applications. One of the most impressive examples is OpenAI’s Codex, a system that can generate code from natural language descriptions. Codex powers Copilot, a tool that helps developers write better code faster and easier. In this blogpost I am going to express my opinion about this sophisticated technology and its integration with my favourite data platform, Power BI, well, I mean Microsoft Fabric.

What is Copilot, and how does it work?

Copilot is an AI-powered tool that provides suggestions for code completion and documentation as you type. It works as an extension for Visual Studio Code and GitHub Codespaces. Copilot can understand the context and intent of your code and generate relevant suggestions that match your coding style and best practices. You can accept, reject, or modify the suggestions as you wish.

Copilot in GitHub
Copilot in GitHub

Copilot is not just a code autocomplete tool. It can also help you write tests, implement new features, fix bugs, and learn new frameworks or languages. Copilot can even generate code from plain English comments or queries, such as “Create a function that adds two numbers” or “How do I sort a list in Python?”. It’s amazing, isn’t it?

How does Copilot integrate with Power BI?

Power BI is a powerful data analysis and visualisation platform that enables you to connect to various data sources, transform and model your data, create interactive reports and dashboards, and share your insights with others. Power BI also supports custom visuals and extensions that can enhance your data experience.

Continue reading “Copilot for Power BI, What Does it Mean for Power BI Development?”

Power BI Governance, What Organisations Need to Know

Power BI Governance Art Built by Bing Image Creator

In recent years, Power BI has become one of the most widely used business intelligence (BI) tools. Power BI is more than just a reporting tool; it is a comprehensive analytical platform that enables users to collaborate on data insights and share them internally and externally. In addition to creating reports and dashboards, Power BI allows users to collaborate and share their work with others. For instance, users can share dashboards with their colleagues, allowing them to view, interact, and engage with the data quickly. However, as more organisations adopt Power BI, it becomes essential to ensure appropriate governance processes, policies, and rules are in place. This blog post explains Power BI governance and why business owners need to be conscious of it.

Power BI governance refers to a set of processes, policies, and standards that organisations put in place to manage and control the use of Power BI. Governance is critical to ensure that the use of Power BI is aligned with the organisation’s objectives and strategy, complies with relevant regulations and standards, and protects sensitive data. Power BI governance encompasses several areas, including security, data management, compliance, and user management. It also involves defining data access, sharing, security, and compliance guidelines within Power BI. This includes defining roles and permissions for users, specifying approved data sources that can be used, and ensuring that the data is accurate, up-to-date, and secure across the organisation. In addition, Power BI governance involves monitoring and auditing the use of Power BI to ensure that it is being used appropriately and in compliance with the organisation’s policies. Lack of Power BI governance can impact businesses in various negative ways, so it is important that everyone within the organisation, especially the managerial teams, has a good understanding of how they can benefit from supporting the establishment of Power BI governance across the organisation. Here are some reasons:

  • Better decision-making
    With Power BI governance in place, organisations can ensure that the data used in decision-making is accurate, consistent, and trustworthy. This can help them make informed decisions based on reliable data insights.
  • Improved security and compliance
    Power BI governance helps to establish security measures to protect sensitive data and ensure compliance with regulations and industry standards. This helps to avoid costly data breaches and non-compliance penalties.
  • Efficient use of resources
    By establishing guidelines for roles and responsibilities, data access, sharing, and storage, Power BI governance can help organisations use their resources more efficiently. This can result in cost savings and improved productivity.
  • Enhanced collaboration
    Having Power BI governance policies help business owners to promote collaboration and communication among team members. This can result in improved teamwork and better outcomes for the organisation.
  • Better management and control
    Power BI governance helps organisations to manage and control the use of Power BI within the organisation. This can help them ensure that the tool is being used effectively and efficiently and that data is being used in a way that aligns with their business objectives.
Continue reading “Power BI Governance, What Organisations Need to Know”

Datatype Conversion in Power Query Affects Data Modeling in Power BI

Datatype Conversion in Power Query Affects Data Modeling in Power BI

In my consulting experience working with customers using Power BI, many challenges that Power BI developers face are due to negligence to data types. Here are some common challenges that are the direct or indirect results of inappropriate data types and data type conversion:

  • Getting incorrect results while all calculations in your data model are correct.
  • Poor performing data model.
  • Bloated model size.
  • Difficulties in configuring user-defined aggregations (agg awareness).
  • Difficulties in setting up incremental data refresh.
  • Getting blank visuals after the first data refresh in Power BI service.

In this blogpost, I explain the common pitfalls to prevent future challenges that can be time-consuming to identify and fix.

Background

Before we dive into the topic of this blog post, I would like to start with a bit of background. We all know that Power BI is not only a reporting tool. It is indeed a data platform supporting various aspects of business intelligence, data engineering, and data science. There are two languages we must learn to be able to work with Power BI: Power Query (M) and DAX. The purpose of the two languages is quite different. We use Power Query for data transformation and data preparation, while DAX is used for data analysis in the Tabular data model. Here is the point, the two languages in Power BI have different data types.

The most common Power BI development scenarios start with connecting to the data source(s). Power BI supports hundreds of data sources. Most data source connections happen in Power Query (the data preparation layer in a Power BI solution) unless we connect live to a semantic layer such as an SSAS instance or a Power BI dataset. Many supported data sources have their own data types, and some don’t. For instance, SQL Server has its own data types, but CSV doesn’t. When the data source has data types, the mashup engine tries to identify data types to the closest data type available in Power Query. Even though the source system has data types, the data types might not be compatible with Power Query data types. For the data sources that do not support data types, the matchup engine tries to detect the data types based on the sample data loaded into the data preview pane in the Power Query Editor window. But, there is no guarantee that the detected data types are correct. So, it is best practice to validate the detected data types anyway.

Power BI uses the Tabular model data types when it loads the data into the data model. The data types in the data model may or may not be compatible with the data types defined in Power Query. For instance, Power Query has a Binary data type, but the Tabular model does not.

The following table shows Power Query’s datatypes, their representations in the Power Query Editor’s UI, their mapping data types in the data model (DAX), and the internal data types in the xVelocity (Tabular model) engine:

Power Query and DAX (data model) data type mapping
Power Query and DAX (data model) data type mapping

As the above table shows, in Power Query’s UI, Whole Number, Decimal, Fixed Decimal and Percentage are all in type number in the Power Query engine. The type names in the Power BI UI also differ from their equivalents in the xVelocity engine. Let us dig deeper.

Continue reading “Datatype Conversion in Power Query Affects Data Modeling in Power BI”