From the course: ChatGPT and Power BI

Unlock this course with a free trial

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

Generate DAX from examples

Generate DAX from examples

From the course: ChatGPT and Power BI

Generate DAX from examples

- [Instructor] Up next, let's take our calculated columns versus measure example one step further and see if GPT and Bard can provide some examples of what measures or calculated columns may look like. So I'm going to start off here and I'm going to paste in my prompt and basically just say, hey, I'm using Power BI. Can you provide an example of when to use calculated columns and measures? And certainly, calculated columns and measures serve different purposes. You know, we've seen a lot of this already, right? Those same kind of bullet points about calculated columns, calculated at the row level. Useful when you need to create calculations based off a specific rows of data, calculated during refresh, right? So we've got all that kind of common stuff. Then we've got an example here. So it says, let's say you have a table named Sales with columns like Quantity and Unit Price. You can create a calculated column called Total Sales by multiplying Quantity and Unit Price for each row…

Contents