DAX

  • Automating DAX Measure Formatting in Power BI with Tabular Editor

    Until coming across this piece of code, I often used the DAX formatter (https://www.daxformatter.com/) to format all of my Tabular Model measures. However, if you end up writing a lot of measures in your Tabular Model this can become quite tedious. There is a faster method however. Using Tabular Editor 2 and some basic C# code you can format all of your Tabular model measures at once. Assuming you have Tabular Editor 2 installed on your machine,…

    » Read more
  • Power BI Table Totals Not Adding Up? Here’s Why!

    Power BI Table Totals Not Adding Up? Here's Why!

    Ever built a table containing measures in Power BI, done a quick sanity check on your table totals and noticed they’re incorrect? Let’s explore why this may be. Here we have a simple table, built from data in the AdventureWorks database. It shows the three product categories, the Total Sales and Average Order Total of each category: As you can see, the Total Sales column adds up perfectly, but the average is just plain wrong. 19.42 +…

    » Read more
  • Power BI – Visual to show filters that have been applied to a report

      Most PowerBi reports will use slicers to allow the user to filter and interact with the visuals they have. But in practice, users may forget what slicers have been applied. It’s inconvenient to have to look through each slicer, potentially across multiple pages, to see what filters are being used on the report. Therefore, it is not user friendly. We need to show every filter that has been applied in one convenient place. Thankfully,…

    » Read more
  • Part 4: Natural Language Processing – Bringing it all together!

    Here’s the final post in this blog series on natural language processing where we are going to bring everything together and web scrape Trust Pilot for review data, which we will then perform Natural Language Processing on and then display in a Power Bi dashboard. I’ll be talking exclusively practically in this demo, so for a refresher on the theory please refer back to my earlier blogposts (Part 1, Part 2, Part 3). To re-iterate the goal…

    » Read more
  • Using ChatGPT as a Development Tool

    As a developer, you are always looking for ways to streamline your workflow and improve efficiency. One tool that you should consider adding to your development toolkit is ChatGPT. What is ChatGPT? ChatGPT is a chatbot developed by OpenAI that uses the power of machine learning to understand and generate human-like text. It is trained on a large dataset of human conversations, which allows it to understand the context and nuances of language,…

    » Read more
  • Previous Row Value DAX

    In this quick blog post I’m going to show you how to use a hidden DAX function to get a previous row value with just a few lines of code. It’s that hidden that intellisense doesn’t even recognise it! I’ll use an example of some fictional race results from some well-known cartoon characters! Lets assume that in this scenario we wanted to analyse the time difference between 1st and 2nd place, 2nd and 3rd place etc in the race scenario…

    » Read more
  • Making the DAX Engine Work for You

    In my last blog post which can be found here, I demonstrated that it’s important to limit your DAX filters to specific columns rather than entire tables, now we know that we can and should do it, let’s explore why and how it works. There are numerous ways to write an expression that will give the same result set, but why are some ways more efficient than others? To answer that we need to know a little about what happens under the hood,…

    » Read more
  • Variables in DAX

    Variables can simplify your DAX code, help with debugging and help improve performance. To use variables in your DAX measure you need to declare a variable using the VAR keyword, give the variable a name, and then assign an expression to the variable. You can use multiple variables in a measure but when using variables you must use a RETURN statement to specify the final output to be returned. To show how to make use of variables I’ll go…

    » Read more
  • How the UNICHAR() DAX Function Enhances Power BI Reports

    Enhance your Power BI reports and heighten your user's experience with icons and emojis

    » Read more
  • How to export more than 30,000 rows of data from Power BI Desktop.

    Have you ever wanted to export a table from Power BI Desktop into Excel just to make sure the DAX you’ve written is performing as expected but ran into this error message: “Data exceeds the limit – Your data is too large. Some data sampling may occur”? Most probably this has occurred because you’ve got more than 30,000 rows of data in your table that you’re trying to export. In the example shown below I’ve actually got 30,001 rows…

    » Read more