Power BI: Moving Beyond the Basics of Power BI and Learning about DAX Language - podcast episode cover

Power BI: Moving Beyond the Basics of Power BI and Learning about DAX Language

Jan 25, 202519 min
--:--
--:--
Download Metacast podcast app
Listen to this episode in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Episode description

The Book provides a comprehensive guide to Microsoft Power BI, a powerful business intelligence tool. It begins with a basic overview of Power BI's components, features, and benefits, emphasizing its ability to connect to a wide range of data sources and visualize data in various ways. The document then moves on to a detailed exploration of DAX, Power BI's formula language, covering its syntax, different types of functions, and best practices for using them. Finally, the guide offers practical tips and advice on creating effective visualizations, dashboards, and reports using Power BI, along with insights on data filtering and hierarchy management.

You can listen and download our episodes for free on more than 10 different platforms:
https://linktr.ee/cyber_security_summary

Get the Book now from Amazon:
https://www.amazon.com/Power-BI-Moving-Learning-Language/dp/B084DGNL4S?&linkCode=ll1&tag=cvthunderx-20&linkId=901b92b5f1ed68fcf35e73dd44277418&language=en_US&ref_=as_li_ss_tl




Discover our free courses in tech and cybersecurity, Start learning today:
https://linktr.ee/cybercode_academy

Transcript

Speaker 1

Hey everyone, and welcome to the deep dive today. We're diving into POWERBI and dax Ooh, POWERBI and dax it's pretty popular, right, Yeah, it's.

Speaker 2

A really powerful combo.

Speaker 1

It's changing the way we look at data and analyze data definitely. So you gave us some awesome resources to help guide our deep dive today, including excerpts from this book called POWERBI, moving beyond the basics of POWERBI and learning more about decks. Okay, so, obviously, respecting copyright, we're using all this material for purely educational purposes, of course, But let's just jump right in. What's the big deal with POWERBI?

Speaker 2

So POWERBI is so popular because it makes data analysis accessible Okay, So it's user friendly, got it even for people who aren't, you know, like data scientists or anything.

Speaker 1

Right, So like a drag and drop interface I've heard about that exactly, to make it easy to create visualization. It's almost like building with digital legos.

Speaker 2

That's a good analogy.

Speaker 1

But the real magic happens when you combine that with DAX right, the language behind.

Speaker 2

It exactly, that's the secret sauce.

Speaker 1

That lets you do those complex calculations and really dig into the data. Okay, before we get into the decks, can you give us a quick overview of the powerbi ecosystem.

Speaker 2

Sure, the powerbi ecosystem has well. There are a few different components. You've got the powerbi desktop is where you build your reports and visualizations at it. And then there's the Powerbi service, which is the online platform where you share your work and you can collaborate. And then there's also mobile apps. Oh cool, So you can access your data from anywhere.

Speaker 1

So it's like this like a whole data analysis studio exactly, from creation to collaboration and on the go access.

Speaker 2

Yep.

Speaker 1

All right, and I know that powerbi can connect to a ton of different data sources. What are some of the possibilities there.

Speaker 2

That's one of the things that's so great about it. You can connect to data from pretty much anywhere. Oh wow, spreadsheets, databases, cloud services, you name it.

Speaker 1

So like a melting pot. Yeah, from all these sources. That's amazing.

Speaker 2

Yeah. And there's two main ways to connect to data, import and direct query.

Speaker 1

Okay, let's unpack these two different methods. Imagine there's some trade offs with each one.

Speaker 2

So with import, yeah, you're bringing a copy of the data into power Bi Okay, So you have a lot more flexibility to shape and manipulate the data.

Speaker 1

Got it.

Speaker 2

But it's a snapshot in time.

Speaker 1

Okay.

Speaker 2

So if the original data changes, you need to refresh your power bi data set.

Speaker 1

Okay. So it's like having a local copy of a file exactly if you can make all the edits you want without affecting the original uh huh, got it? What about direct query?

Speaker 2

Direct query is more like a live feed to the data source.

Speaker 1

Got it.

Speaker 2

So it maintains that constant connection. You're always working with the most up to date information.

Speaker 1

That makes sense.

Speaker 2

But there's a trade off.

Speaker 1

Okay.

Speaker 2

You have more limited ability to manipulate the data within Powerbi, and it might not be the best for huge data sets okay, because it can impact performance.

Speaker 1

So it's a balancing act between those two. If you need real time direct query, but if you need the flexibility.

Speaker 2

Exactly import okay.

Speaker 1

So it all comes down to choosing the right tool for the job. Before we even start building out our visualizations, there are a few key concepts you understand.

Speaker 2

So the book highlights data sets, okay, visualizations, reports, and dashboards.

Speaker 1

Okay, So let's break those down. Okay, what are data sets in Powerbi.

Speaker 2

Data sets are collections of data that Powerbi uses to create visualizations and reports.

Speaker 1

Okay, So like gathering the ingredients before you start cooking, you've got to have all the data sets prepped and ready to go, right exactly. And once you have your data sets, you can start creating visualizations the visual representation of that data.

Speaker 2

And there's tons of different options.

Speaker 1

This is where it gets fun, right, Yes, bar charts, pie charts, all that good stuff, bringing the data to life.

Speaker 2

It makes the data much easier to understand when you can see it visually.

Speaker 1

So visualizations are like the individual snapshots of the data, right, But how do we combine those snapshots into a bigger picture.

Speaker 2

That's where reports come in. Reports are collections of visualizations that tell a data story, got it. It could be single pages, multiple pages, okay, but they are a way to arrange your visualizations.

Speaker 1

Okay. So if visualizations are the pieces of the puzzle, a report is the completed puzzle, showing the full picture.

Speaker 2

Exactly I like it. And then there's one more piece, yeah, dashboards. Dashboards they're like the executive summaries you can put your most important visualizations, okay, or key performance indicators. Got it designed for high level monitoring.

Speaker 1

So if the report is the full story, yeah, this is the highlight reel.

Speaker 2

It's exactly.

Speaker 1

This is the key takeaways that you want everyone to see, exactly, So present the most relevant information in a concise and appealing way. Yes, it's pretty powerful.

Speaker 2

It is.

Speaker 1

You can collect data from these various sources, transform it into these insights, and then present it in a way that's informative and engaging.

Speaker 2

Exactly.

Speaker 1

This is awesome. We've covered so much already. Oh yeah, the components of POWERBI, the different connection methods, visualizations, reports, and dashboards. I have a feeling we're just getting started.

Speaker 2

We are just getting started. Now we're going to get into the real fun stuff.

Speaker 1

Ooh okay, Das all right, daks.

Speaker 2

The language that unlocks the true power of POWERBI.

Speaker 1

That's what I'm waiting for, Yeah, to unlock the true power create those custom calculations and visualizations that take data analysis to the next level. Absolutely, I'm ready to get my hams dirty with Das.

Speaker 2

All right, welcome back to our deep dive into POWERBI and DAX.

Speaker 1

It really feels like we've just explored this vast landscape of POWERBI and now we're ready to like build something amazing with DAK as our toolkit.

Speaker 2

It is like a tool.

Speaker 1

I'm ready to roll up my sleeves and see what this DAX toolkit can do.

Speaker 2

Let's do it.

Speaker 1

Where should we start?

Speaker 2

So the book dives into some key categories of DAX functions, okay, like aggregate functions, filter functions, and time intelligence functions.

Speaker 1

Okay, so those are kind of like the workhourses of DAKS.

Speaker 2

Yeah, there are the workhourses.

Speaker 1

That let you perform calculations and filter data and analyze trends over time exactly. Okay, that sounds like a pretty logical place to start. Let's start with aggregate functions.

Speaker 2

Okay.

Speaker 1

Are these similar to the functions that we might use and Excel like SU and average.

Speaker 2

They are, but there's a key difference. In Excel, you're applying functions to individual cells or ranges of cells, okay, but in DAKS you apply them to entire columns or tables of data.

Speaker 1

Ah. That makes sense because we're dealing with these much larger data sets empower BI, so we need these functions that can handle that kind of scale. Right, Can you give me an example of how DA's aggregate function works in practice.

Speaker 2

Sure. Let's say you're analyzing sales data, okay, and you have a column called sales amount.

Speaker 1

Got it?

Speaker 2

To calculate the total sales for all transactions, okay, you would use the im function in DAX and you'd apply it to that entire sales amount column.

Speaker 1

So instead of adding up the sales one by one, we're just telling DAX sem the whole column. That's efficient. And what if we wanted to calculate like the average sale instead of the.

Speaker 2

Total, then you would use the average function, okay, and you would apply it to the entire sales amount column.

Speaker 1

Got it? So some and average are pretty straightforward. Yeah, but what about like finding the highest or lowest sales values?

Speaker 2

So for that, you would use the max function to return the largest value or the min function to get the smallest value.

Speaker 1

Okay, so we have max and min. I'm starting to see a pattern here.

Speaker 2

Yeah.

Speaker 1

These DAX functions have these really fuitive names. Do that make them pretty easy to understand?

Speaker 2

Yeah? DAX is meant to be accessible, Okay, even for people who aren't programmers.

Speaker 1

I like that. But don't let the simplicity fool you, right, because DAX can handle incredibly complex calculations. It can, all right, I'm eager to see how far we can push that. Now, we've talked about calculating sums, averages, maximums, minimums. Are there any other aggregate functions that we should be aware of?

Speaker 2

Yeah, there are tons. There's functions for counting distinct values, counting grows in a table, and even calculating statistical measures like standard deviation and variance.

Speaker 1

So we can get really granular with our data analysis. Again, using these aggregate functions, it's like having a statistical Swiss Army knife. It is at our disposal.

Speaker 2

Yeah.

Speaker 1

But sometimes we need to do more than just calculate summaries.

Speaker 2

Right, Sometimes we need to filter our data, yes, to focus on like specific subsets or conditions. It's where filter functions come in.

Speaker 1

That's where they come in.

Speaker 2

It's like using a search engine to refine our results. Yeah, we only want to see data that meets our criteria exactly. So how do we accomplish that? In DAX.

Speaker 1

One of the most powerful filter functions is calculate Okay. It allows you to modify the filter context of a calculation.

Speaker 2

Okay, So essentially we're telling DAX to perform a calculation, but only on a subset of the data, right that meets a certain condition.

Speaker 1

Exactly.

Speaker 2

You give me concrete example.

Speaker 1

Sure. So let's say we want to analyze sales for a specific product category okay, like electronics. Okay, electronics, So we would use calculate to sum the sales amount column, but only for transactions where the product category column equals electronics.

Speaker 2

Ah. Okay, So we're using calculate to kind of zoom in a particular segment of our data.

Speaker 1

Right, that's super helpful. What other filter functions should we have in our DAS toolbox?

Speaker 2

Another useful one is filter.

Speaker 1

Okay.

Speaker 2

That function creates a new table that only includes rows that meet a specific condition.

Speaker 1

So it's like creating a custom view of your data. So if we wanted to see all the customers who made a purchase over one hundred dollars, we could use filter to create a table with just those customers exactly. And there's alexcept, which is a little.

Speaker 2

More advanced, Yeah, a little more advance.

Speaker 1

It removes all filters from a table except for the filters on the specific columns that you choose. Yeah, okay, alexcept sounds a little bit complex. It is can you walk me through like a scenario where we might use this.

Speaker 2

Sure, Let's say you're analyzing sales by region, okay, but you also want to see the overall company sales as a benchmark.

Speaker 1

Okay.

Speaker 2

You can use alex scept to calculate the total company sales while still keeping those regional filters in place for your other calculations.

Speaker 1

So you're basically saying, show me the total sales huh, regardless of region, but keep.

Speaker 2

My regional filters active for other comparisons. Yeah, that's a great example. Yeah, it seems like alex scept gives you a lot of control over how those filters are applied.

Speaker 1

It does, all right.

Speaker 2

So we've explored aggregate functions for calculations, Yeah, filter functions for narrowing down our data. But what about when we want to analyze trends over time?

Speaker 1

Yeah, that's where time intelligence functions come in.

Speaker 2

Yeah. Time is such a crucial element in most date analyzes. It is we need to be able to track how things change over days, weeks, months, years. What kind of time bending magic can DAX perform a lot?

Speaker 1

There's a whole set of functions for handling dates and time periods. You can calculate year to date totals, rolling averages. You can do comparisons to previous periods.

Speaker 2

It's like having a time machine for our data. It is so you can travel back and forth through time, analyzing trends and patterns. Give me some examples of how these time intelligence functions work in practice. Sure, let's say you want to track your company's sales performance month by month. Okay, you could use the total MTD function to calculate the total sales for each month in the year.

Speaker 1

So total MTD is pretty self explanatory. Yeah, total sales for the month to date, right, But what if I want to see how my sales this month compared to the same month last year.

Speaker 2

There's a function for that too. Oh perfect, It's called same period last year.

Speaker 1

Okay.

Speaker 2

It lets you compare values for the same period in the previous year.

Speaker 1

Okay. That's incredibly useful for spotting seasonal trends. Yeah, or measuring year over year growth.

Speaker 2

Huh.

Speaker 1

Are there other time intelligence functions that we should be aware of?

Speaker 2

Yes, there are a lot.

Speaker 1

Okay.

Speaker 2

There's functions for calculating moving averages, identifying beginning and end dates of periods. You can shift dates forward or backward in time, so you.

Speaker 1

Can get really granular with your time based analysis.

Speaker 2

You can.

Speaker 1

This is fascinating, it is. It feels like we've only just scratched the surface of what DACKS can do. It's an incredibly versatile and powerful language, it is, and as we become more familiar with it, we discover endless possibilities for manipulating and analyzing our data. Absolutely, this is definitely making me want to dive deeper into dacks and see what kind of insights I can uncover? What else should we explore?

Speaker 2

So we've been talking about how these functions work in isolation, but the real power comes when you start combining them, okay, to create more complex formulas.

Speaker 1

Ooh, I like where this is going. Yeah, let's start combining these DAX functions and see what kind of data magic we can conjure up.

Speaker 2

Let's do it.

Speaker 1

Welcome back to the deep dive. I'm feeling energized after going through those DAX functions. Yeah, it's like we've unlocked this secret code to the data universe.

Speaker 2

Yeah.

Speaker 1

Now we're going to take things up a notch okay and see how these functions can be combined to create even more sophisticated analysis exactly. Ooh, I like it all right, let's dive into this world of DAX formula combinations and see what we can create.

Speaker 2

So remember we were talking about using the calculate function to filter data. Yeah, imagine you're a sales manager and you want to compare the performance of your sales team across different regions. Okay, you could use calculate in conjunction with an aggregate function. Uh huh, like sem to see the total sales for each region.

Speaker 1

So we're using calculate to slice the data by region, yeah, and then sum to add up the sales within each of those slices exactly.

Speaker 2

But what if you wanted to take it a step further and see how each region performed compared to the same period last year.

Speaker 1

Ooh, that's where our time intelligence functions come in, right right. Could we somehow combine calculate with like same period last year.

Speaker 2

Yes, you can. That's the beauty of DAS. Okay, you can nest functions to create these multi layered calculations, got it. So you can use calculate to define the outer filter context okay, like sales by region, and then nest same period last year within that to calculate last year's sales for the corresponding period.

Speaker 1

Okay, my mind is slightly blown right now. So we're doing a year over year comparison within each regional slice of our data. Yeah, that's some serious analytical power, it is. And that's just one example. Right, you can combine DAX functions in countless ways to answer all sorts of complex business questions. I'm starting to see the possibilities here. Yeah, but I gotta admit building these nested formulas, uh huh can seem a little daunting.

Speaker 2

It can be.

Speaker 1

What are some tips for making it easier to write these more complex DAX expressions.

Speaker 2

Well, one tip is to break down your problem into smaller steps. Okay, don't try to write the entire formula once got it. Think about the individual components you need and the functions that can achieve each step.

Speaker 1

So it's like building a house. You wouldn't try to construct the entire thing in one go, exactly. You'd start with the foundation, and then the walls and then the roof. Right, it's crucial to have a clear plan before you start. It is writing your Dack's formula, map out the logic and the sek quints of functions. Any other advice for aspiring DAX wizards out there.

Speaker 2

Another helpful tip is to use the tools that powerbi provides. Okay, So the formula bar has intell a sense okay, which suggests functions and arguments as you type.

Speaker 1

Oh, that's nice.

Speaker 2

So it makes it much easier to find the right components.

Speaker 1

That's like having a copilot, Yeah, guiding you through the formula writing process. It is takes a lot of the guesswork out of it.

Speaker 2

Yeah, and don't forget about all the online resources.

Speaker 1

It's true.

Speaker 2

There's forums and blogs and tutorials.

Speaker 1

It's great to know there's a supportive community out there for DAX learners.

Speaker 2

Yeah.

Speaker 1

Are there any common pitfalls that people tend to fall into one writing DAX formulas? Things we should watch out for.

Speaker 2

One common mistake is forgetting about filter context.

Speaker 1

Okay.

Speaker 2

DAX formulas operate within a specific filter context, which determines what data is being used for the calculation.

Speaker 1

Yeah.

Speaker 2

If you're not mindful of the filter context, Yeah, you might get some unexpected results.

Speaker 1

It's like this invisible force it is that's shaping our calculations behind the scenes.

Speaker 2

Yeah. Another common pitfall using the wrong data type.

Speaker 1

Okay.

Speaker 2

DAX is really strict about data types, got it. So if you try to perform a calculation on incompatible data types, you're going to get an error.

Speaker 1

Okay, So paying attention to data types is crucial.

Speaker 2

Yeah, it's like using the right ingredients in a recipe.

Speaker 1

Right, Okay. Any other DAX traps to watch out for.

Speaker 2

Over using variables. Variables can be helpful, yeah, but using too many can make your code harder to read, okay and debug.

Speaker 1

So it's all about finding that balance, using them strategically without overcomplicating things exactly.

Speaker 2

And lastly, yeah, don't be afraid to experiment. Okay, that's the best way to learn DAX. Yeah, try different functions, combine them, see what happens.

Speaker 1

I love that advice. It's all about embracing the spirit of exploration it is, and not being afraid to make mistakes along the way.

Speaker 2

Exactly.

Speaker 1

That's how we learn. Yeah, this has been an incredible journey. It has we explored the key components of power BI, the DAX functions, and even how to combine them. I'm feeling inspired and empowered to tackle my own data challenges with DAX as my trustee. Sidekick.

Speaker 2

That's great.

Speaker 1

You've certainly succeeded in sparking that enthusiasm in me. I'm glad this has been a fantastic exploration.

Speaker 2

It has been.

Speaker 1

I can't wait to put all this knowledge into practice. Me too, awesome. This has been fun.

Speaker 2

Yeah, it has. Thanks for having me, and.

Speaker 1

To all of our listeners out there. Until next time, happy analyzing.

Transcript source: Provided by creator in RSS feed: download file
For the best experience, listen in Metacast app for iOS or Android