Press "Enter" to skip to content

Curated SQL Posts

Dynamic M Parameters now GA

Dany Hoter shows off dynamic M parameters in Power BI:

The user is creating an application in which he wants to embed Power BI.

The same Power BI report will be used in different contexts and the user wanted to have a different header each time and to provide the header as part of the URL.

There may be other ways to solve this problem(?) but as the solution was already using ADX, the user came with a way that involves Direct Query and a dynamic parameter to solve the dynamic header.

Click through to see how to solve this problem.

Comments closed

Thin Reports in Power BI

Soheil Bakhshi’s reports get the Kate Moss treatment:

Shared Datasets have been around for quite a while now. In June 2019, Microsoft announced a new feature called Shared and Certified Datasets with the mindset of supporting enterprise-grade BI within the Power BI ecosystem. In essence, the shared dataset feature allows organisations to have a single source of truth across the organisation serving many reports.

Thin Report is a report that connects to an existing dataset on Power BI Service using the Connect Live connectivity mode. So, we basically have multiple reports connected to a single dataset. Now that we know what a thin report is, let’s see why it is best practice to follow this approach.

Read on for Soheil’s thoughts on the topic and a tutorial on how to create a thin report.

Comments closed

Combining flashlight and plotly in R

Michael Mayer analyzes candidate models:

Since almost all plots in flashlight are constructed with ggplot, it is super easy to turn them into interactive plotly objects: just add a simple ggplotly() to the end of the call.

However… it is not straightforward to show interactive plots in a blog! Thus, we show only screenshots of the resulting plots here and refer to the complete HTML report here: https://mayer79.github.io/flashlight_plotly/flashlight_plotly.html

We will use a sweet dataset with more than 20’000 houses to model house prices by a set of derived features such as the logarithmic living area. The location will be represented by the postal code.

Click through for the blog post or check out the report.

Comments closed

Updating Views with INSTEAD OF Triggers

Chad Callihan performs sleight of hand:

I ran into a strange issue recently and thought it would make for a great blog post. I was notified of a standard application process failing with the following SQL error:

Msg 4405, Level 16, State 1, Line 19
View or function ‘XXXXX’ is not updatable because the modification affects multiple base tables.

I recognized the error but was baffled as to why it was showing up in this particular area. I’d updated or modified this view plenty of times in the past so what’s going on?

Read on for the answer.

Comments closed

Azure Databricks Security Considerations

Craig Porteous provides some advice on configuring Azure Databricks:

Azure Databricks is an analytics platform and often serves as the central compute component of a data platform, to process ETL/ELT data pipelines and data science workloads. As Databricks is a third-party platform-as-a-service offering securing it works differently to most other first-party services in Azure; for example, we can’t use private endpoints. (More on these in the Azure Storage post)

The two main approaches to working with Databricks in our secure platform are VNet Peering or VNet Injection

Click through to learn the difference between these two, as well as a few other factors to keep in mind as you’re deploying Databricks.

Comments closed

Viridis Color Palettes in Power BI

Meagan Longoria shares a few themes:

I am a fan of the viridis color palettes available in python and R, so I decided to make Power BI theme files for each of the 4 color maps (viridis, inferno, magma, plasma). These color palettes are not only lovely to look at, they are colorblind/CVD friendly and perceptually uniform (or close to it).

The screenshots below show the colors you’ll get when you use my theme files.

Click through to get the theme files and some additional advice from Meagan in the GitHub repo itself.

Comments closed

Diagnostics ID and ActivityID in Power Query

Chris Webb looks into activity IDs:

I was looking at the output of Power Query’s Query Diagnostics feature recently (again) and trying to understand it better. One of the more confusing aspects of it is the way that the Power Query engine may evaluate a query more than once during a single refresh. This is documented in the note halfway down this page, which says:

Jorge’s comment on the post adds even more context around what the ID Chris comes up with actually means.

Comments closed

Synapse Database Templates GA

Kevin Schofield makes an announcement:

We’re pleased to announce today that Synapse Database Templates are now Generally Available and that we are also making available three additional Synapse Database Templates for Healthcare Insurance, Healthcare Providers, and R&D and Clinical Trials.

The Healthcare Insurance template is a comprehensive data model that addresses the typical data requirements of organizations providing insurance to cover healthcare needs (sometimes known as Payors).

The Healthcare Providers template is a comprehensive data model that addresses the typical data requirements of organizations providing healthcare services.

The R&D and Clinical Trials template is a comprehensive data model that addresses the typical data requirements of organizations involved in research and development and clinical trials of pharmaceutical products and devices.

Read on to learn more about how these templates work and what you can do with them.

Comments closed

Finding the Last Refresh Time on Power BI Partitions

Dennes Torres has written a tool:

On the article Automating table refresh in Power BI I explained many methods to automate refresh of individual objects, which could be tables or partitions.

This creates the need of good ways to visualize the last refresh date and time for each partition and table. The portal shows the refresh date/time for the entire dataset, we can’t identify on the Power BI portal the exactly date for each table last refresh.

Read on for a link to the refresh code and an example of it in action.

Comments closed