From the course: Excel and ChatGPT: Data Analysis Power Tips

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Generate DAX and M Code

Generate DAX and M Code

- [Instructor] So we've talked about how to use tools, like ChatGPT and Bard, to generate or interpret Excel worksheet formulas. Now let's take it a step further and see if we can use those tools to generate DAX or M Code as well. So for this demo, what I've done is loaded up a simple movie table into Excel's data model. You can see I've got movie titles here, along with fields like genre, country, rating, IMDB score, and gross revenue. Now suppose we want to do some analysis and understand average IMDB scores for different combinations of genre and rating. Well, one way to do that would be to use a PivotTable, like so. You can drop it right here into our worksheet. Let's go ahead and activate our Field list. And suppose we care specifically about the average IMDB score. Go ahead and change the Field Settings from Sum to Average for PG-13 rated films specifically. we'll filter down to just PG-13, and only for Action…

Contents