From the course: ChatGPT and Power BI

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Generate DAX measures from scratch

Generate DAX measures from scratch

From the course: ChatGPT and Power BI

Generate DAX measures from scratch

- [Aaron] All right, so we're doing pretty well so far, and GPT has been, for the most part, helping us out. So let's kick things up a bit and see what happens when we ask ChatGPT to create a DAX measure for us from scratch. All right, so I'm going to copy and paste my prompt. "I'm using Power BI. "Could you help me write a DAX formula "to calculate total revenue?" "Certainly! "To calculate total revenue in DAX, "you'll need to have a table "that contains a column representing the sales amount "or revenue for each transaction or item." So "Let's assume you have a table called 'Sales' "with a column named 'Revenue.' "To calculate the total revenue, "you can use the following DAX formula." So total revenue equals the sum of the revenue column from the sales table. Again, pretty straightforward here, and without any further context or insight into how the data model is created, the model makes an assumption here saying, "Hey, if you had a table, you basically just want to sum "the…

Contents