What I Learned: use the lookup function in Power BI

 Ok, so real talk, I've been feeling very self-conscious about having a "How To" day on the blog to the point that I've been avoiding it. Instead I'm changing this to a "What I Learned" day so that I'm not feeling as though I'm being condescending or a 'know it all' even though the point is to figure out how to do these different things and share my experiences on what new thing I learned in the past week.

I'm also not going to limit this to only sustainability and conservation because it's becoming a chore more than an outlet. Everything I do has that thought in my decision making process, but it may not be the overarching theme for what I learned in the past week. 

This week the topic is Power BI. I do a lot of volunteering helping our local zoo with data processing. It feels good to do it, it fills my ego cup because it's something that I'm good at that doesn't involve social skills, and frankly it's building a resume for if/when I go back to work or even school. 

This past week I was struggling because I wanted to get a single number for a basic math function, but I needed to subtract within a column rather than between rows. Power BI is not like excel and this is less intuitive so it was driving me nuts to figure this out until I realized I didn't need to just subtract, I needed something like an xlookup to get relative numbers. 

In this example I want to find the difference in value for the most recent vs. the total average values. 

First things first open up a new measure.

Create a variable using "VAR [insert naming convention here]" and then start the lookup function following the pop up highlighted in the image.

Here's what it looks like in this example with using the session ID as the sequential unique identifiers to reference and the value column as the result.

For this example I wanted to calculate the difference between the most recent value and the average overall, I could have subtracted the most recent from the overall or sliced this a million different ways really, but this is how you would follow the example I used.

And then I threw this into a card to see the result (and of course double checked against excel because I'm like that). Power BI is more useful for visuals, better for presentations and for folks who need to digest complex data quickly, and you can set alerts as well... though more on alerts another day as I'm still working through the specifics on those given the new Microsoft Fabric updates.

That's all for today, though I will add that when I figured this out I messaged the person I help out at the zoo and told her that not only did I have it figured out but was on a "Power B-High"! Yes I know I'm lame and yes I'm proud of it all the same! ;-) 
๐Ÿ’› Jess










Comments

Popular posts from this blog

Let’s Look: Low Level Goals for 2025

Top five: summer movie

Hello!