-
Estimating DAX Query Completion Time
November 28, 2022 / No Comments »
Usually, DAX queries execute very fast, like flashes in a gold seeker's pan. Sometimes, however, you could end up with a massive DAX query that takes minutes if not hours. For example, a financial institution requested credit monitoring results to be evaluated overnight and saved in a relational database for fast retrieval. The query involved processing some 300+ measures for 40 million customers and took about an hour to complete. While working on optimizing the query and tracing its execution, I enabled the VertiPaq SE Query End event and was able to monitor how far the query got by seeing which measure is being processed. This was also useful to understand which measures are more expensive. In general, the server doesn't process measures in parallel. A measure may produce multiple storage queries, some in parallel and some sequentially. The VertiPaq SE Query End event would show the SQL-like query that...
-
Atlanta MS BI and Power BI Group Meeting on November 7th (Data Science for Power BI Developers)
November 2, 2022 / No Comments »
Please join us online for the next Atlanta MS BI and Power BI Group meeting on Monday, November 7th, at 6:30 PM ET. Sandeep Pawar will join us again to show us the Power BI data science features and how you can create ML models. For more details and sign up, visit our group page. Presentation: Data Science for Power BI Developers Date: November 7th Time: 6:30 – 8:30 PM ET Place: Click here to join the meeting Overview: The use of Data Science tools and techniques has grown in the last few years and BI developers are collaborating closely with the Data Scientists. In this session, we will learn about some of the core concepts in data science, key terminologies and the overall process so that you as a BI developer can effectively collaborate with your Data Science team. You will learn about analogous features in Power BI, their...
-
Testing RLS with Power BI Shared Datasets
October 28, 2022 / No Comments »
In a typical engagement, I create an organizational semantic model(s) and "report packs", such as Sales Report Pack, Inventory Report Pack, etc. These report packs are typically implemented as Power BI reports connected to the semantic model as a shared dataset using the Power BI Datasets connector. Reports sanctioned by IT are published to a dedicated workspace, such as Corporate BI. Departmental reports are deployed to their respective workspace, such as Sales, to enforce content-level security. Usually, the semantic model has row-level security (RLS) roles defined to enforce restricted access to data depending on the identity of the interactive user. Although not immediately obvious, here is how you can test RLS to ensure that connected reports produce expected results under someone else's identity directly in Power BI Service: In powerbi.com, go to the workspace where the shared dataset is published. In the dataset page, click the Datasets tab, and then...
-
Correlating Analysis Services Errors with Measures
October 18, 2022 / No Comments »
This blog builds upon my previous "Resolving Tabular Conversion Errors" and applies to Analysis Services in all flavors (Power BI, MD, and Tabular). In the scenario I described in the previous blog, the server at least told us the name of the offending measure in the error description. But sometimes you might not be that lucky. For example, recently I got this error when running a DAX query requesting many measures: "Microsoft OLE DB Provider for Analysis Services." Hresult: 0x80004005 Description: "MdxScript(Model) (2000, 133) Failed to resolve name 'SYNTAXERROR'. It is not a valid table, variable, or function name." All we know is that there is a syntax error in some measure but good luck finding it if you have hundreds of measures in the query and your model. However, the (2000,133) section references the line number and column number in the MDX script (Yeap, MDX even if you use...
-
Resolving Tabular Conversion Errors
October 17, 2022 / No Comments »
A scheduled SSIS job that executes a massive DAX query to an on-prem Tabular server (Power BI can also generate this error) one day decided to throw an error "Source: "Microsoft OLE DB Provider for Analysis Services." Hresult: 0x80004005 Description: "MdxScript(Model) (2020, 98) Calculation error in measure 'Account Snapshot'[Average utilisation % of all CR active current accounts last 3 months]: The result of a conversion or arithmetic operation is either too large or too small." At least we know the offending measure, but which row is causing the error? The query requests some 300+ measures for 120 million customers, so I thought someone might find the troubleshooting technique useful. Let's ignore what the measure does for now except mentioning that it performs a division of two other measures. We can use the DAX ISERROR function to check if a measure throws an error. So, the first step is to wrap...
-
Embedding Power BI Reports in Internal Portals
October 12, 2022 / No Comments »
This question pops up over and over. What's the easiest way to embed a Power BI or paginated report hosted in Power BI Service in an internal portal, such as a custom site developed by your team or on-prem SharePoint Server, so internal users can see all reports in one place? Use the "Embed report" feature that will give you a link or iframe code that you can readily add to the portal without any coding (notice that there is a SharePoint Online option because SharePoint Online has a special webpart for this purpose). Will you get a single sign-on (SSO) so that the interactive user credentials automatically flow to Power BI? Nope. To the best of my knowledge, Power BI doesn't support single sign-on even if your organization has extended its active directory to Azure, but let me know if you have found a workaround. The first time the...
-
Atlanta MS BI and Power BI Group Meeting on October 3rd (Auto-provision embedded report delivery for your customers)
September 29, 2022 / No Comments »
Please join us online for the next Atlanta MS BI and Power BI Group meeting on Monday, October 3rd, at 6:30 PM ET. Tom Huguelet (Lucient) will present a real-world case study and the challenges involved in bringing a Power BI application from initial Excel-based POC to an ISV platform that auto-provisions for new clients, using Power BI Embedded Azure Premium Capacity. For more details and sign up, visit our group page. Presentation: Auto-provision embedded report delivery for your customers Date: October 3rd Time: 6:30 – 8:30 PM ET Place: Click here to join the meeting Overview: In this session we’ll look at a real-world case study and the challenges involved in bringing a Power BI application from initial Excel-based POC to an ISV platform that auto-provisions for new clients, using Power BI Embedded Azure Premium Capacity. We will cover: • Initial Business Case and Project Team • Testing Embedded...
-
Power BI Visual Help Tooltips
September 25, 2022 / No Comments »
Want to display a visual-left hint to perplexed users that explains what your visual is supposed to reveal? Like me, you've probably missed the handy Power BI help tooltips feature that allows you to pop up some helpful text for each visual. On the Format tab of the visualization pane, expand the Help Tooltip section, and enter the text. Then, a question mark glyph shows up in the visual header when the user hovers. Besides showing static text, you could alternatively redirect the user to a report page that could provide more context. Unfortunately, the tooltip tip can't be expression-based due to a long-standing and overdue Power BI limitation that only a small set of properties that can be bound to measures.
-
Batch Renaming Columns in Power BI Tables
September 16, 2022 / No Comments »
Scenario: You need to rename many columns in a Power BI table. Usually, I rename measure-related columns with "Base" suffix and hide them, and then I create explicit measures. Since renaming one column at the time is no fun, you're looking for an automated solution. Having heard about the Tabular Editor scripting feature, you're tempted to whip out a script like this: You select all columns that must be renamed, run the script, and it appears to work (make sure to enable the Power BI experimental feature in the Tabular Editor Preferences before you run the script since otherwise nothing will happen)! You save the changes, the columns show up with the new names in Power BI Desktop, and you're about to call it a successful day. But then when you refresh the table, you get greeted with an error that the column already exists and can't be added, and...
-
Refreshing Power BI Datasets from SSIS
September 5, 2022 / No Comments »
Scenario: You use SSIS to load data for on-prem BI solution. As a last step of the ETL pipeline, you want to refresh a Power BI dataset. There's quite a bit of misinformation on the Internet about how to do this, hence this blog. Solution: If the dataset is hosted in Power BI Pro workspace, the only way is to use the Power BI REST APIs and there are some good examples out there using PowerShell or Microsoft Automate flows. However, if the dataset is hosted in a Premium-per-user (PPU) or Premium workspace, you can use the SSIS built-in Analysis Services Processing Task. And, no, you don't need third-party components. An unattended process can authenticate against Power BI using either a Power BI-licensed account or service principal. I couldn't get service principals to work with Power BI datasets. More than likely, this is because the service principal needs to be...