Blog

  • How to delay a Python loop

    In this blog post, I will run through 3 different ways to execute a delayed Python loop. In these examples, we will aim to run the loop once every minute.To show the delay, we will print out the current datetime using the datetime module. 1 – SleepThe sleep function from Python’s time module pauses the Python execution by the number of seconds inputted. The example below pauses the script for 60 seconds. The above script has a 60 second…

    » Read more
  • SSAS Tabular Calculation Groups – avoid using SELECTEDMEASURE or ISSELECTEDMEASURE

    Introduction: There is a very serious limitation in the behaviour of calculation groups when using the SELECTEDMEASURE or ISSELECTEDMEASURE functions, and we recommend not using them. Why? If a user creates their own custom calculations within their Power BI report (or composite model) then the value of SELECTEDMEASURE changes, breaking your calculation group logic. Let me explain with an example: In a tabular cube we may look to use calculation…

    » Read more
  • ADF: Where have my connections gone?

    If you’ve been doing any development work in ADF this week you might have noticed that “Connections” has moved. But where has it gone? When you click onto “Connections” now you’ll receive the following message: Clicking this button takes you to the new Management Hub, the new fourth icon which goes alongside the existing three. Within this area you now have access to your Linked Services, Integration Runtimes…

    » Read more
  • Using ConcatenateX in PowerBI to return multiple values.

    In this blog post we’ll take a quick look at using ConcatenateX function to view a concatenated string of dates where the max daily sales occurred for a given month. I came across this function whilst going through the excellent “Mastering DAX 2nd Edition Video Course” by the guys from SQLBI.com. So credit to Marco and Alberto for sharing this. So how does it work? If we had a list of dates ranging from 01/01/2020 to 31/12/2020 and we…

    » Read more
  • Regular Expression to get tables from SQL query

    If you’ve not come across regular expressions (RegEx) before then you’re missing out, they’re an incredibly powerful tool for matching, extracting or validating patterns of text. I had a use case this week where I needed to take a SQL query, and quickly identify every table or view that was used in the query. RegEx to the rescue! (?<=((FROM[ \n\r]+)|(JOIN[ \n\r]+)|(APPLY[…

    » Read more
  • Sorting a Power BI table by multiple columns

    A common request that is raised by clients is how to sort a table in Power BI by multiple columns, in the same way you can in Excel.For a while, there was no way (at least no easy way) to do this until the Power BI March 2020 update. I learnt this tip from the following YouTube video:https://www.youtube.com/watch?v=ik0K1H9j2UcFull credit to Dhruvin Shah, check his video out. Below I have a Power BI table displaying fruit sales, currently…

    » Read more
  • Power BI Databricks Spark connection error

    When querying data from Azure Databricks (spark) into Power BI you may encounter an error: “ODBC:ERROR [HY000] [Microsoft][Hardy] (100) The host and port specified for the connection do not seem to belong to a Spark server. Please check your configuration.“ This is usually caused by trying to connect to a ‘Standard’ Databricks instance, but Power BI (and ODBC in general) can only connect to Databricks using a…

    » Read more
  • Cube deployment error: Cannot resolve all paths while de-serializing Database

    I recently came across the following error while deploying a tabular cube using the Analysis Services Deployment Wizard: My updates for this deployment included removing a table from the cube. As part of the cube deployment options I chose to “Retain roles and members”. However the issue here was that an existing role was referencing the table I had deleted, for example the below image shows the Role Manager in Visual Studio and…

    » Read more
  • Azure Data Factory (ADF) Parent Activities don’t trigger ON ERROR OUTPUT when Child Activities Error… What happens?

    So that title is a big question that a client of ours came across that required some additional investigation… What does happen and how do we get around it? In the below example we’ll use a simple IF Activity as our Parent Activity. To explain briefly how it functions, you provide it with a query that evaluates to either True of False. This then passes down to a set of Activities If True and a different set of Activities If False. We…

    » Read more
  • Creating calendar tables with DAX using Power BI

    By Nick Edwards In this blog post we’ll take a quick look at creating a self-generating calendar table using DAX. Dates are important if we want to perform time intelligence reporting on our data i.e. yearly sales, monthly sales, weekly sales, year to date sales or previous year sales. We’ll be using the calendar function to create our date table, but there are other methods to do this such as CALENDARAUTO or GENERATESERIES. Here is the…

    » Read more