 Hi, welcome to Visual Studio Toolbox. I'm your host, Robert Green. And joining me today, Chuck Sterling. Hey, Chuck. Hey, Robert. Long time no bid on the show. It has been a long time. Way too long. Way too long. Welcome back. Thank you. Last time you were on the show, you were over in ALM land. Yes. And since you have moved over to Power BI land. My god, it's so much fun. Power BI is, I think, one of the most under-appreciated tools that we have in the entire arsenal. This thing is so amazingly cool. It is. We've been using it for a lot of reporting. And you're going to show some things today that are even cooler. And we're going to approach it from the standpoint of, how does a developer use Power BI in their apps to do some reporting? Absolutely. I mean, I got into it because I was doing load tests in the ALM business. And I wanted to know how my load tests were doing and what were the KPIs and where are they hitting them. So I started playing with it. And it just kept getting better and better and better. As I was mentioning before we got on, my last demos were all about writing at REST APIs. So when I found out that you could do that here, I'm like, oh, I got to talk to Robert. I got to show him how to actually call REST endpoints, parse the JSON, and make it easy to make it available on your web apps. Very cool. And you're going to show some things that Power BI just does that otherwise we might have to write in code. That's right. I think the last sample I wrote was 400 lines of code to call one REST endpoint. And I'm going to show you how to do that. So if you guys can see. Not 400 lines of code, though. No, no. I've forgotten how to write lines of code. Matter of fact, I think if you look at my keyboard, yeah, the semicolon is gone. I don't have a semicolon on my keyboard anymore. I mean, it's like, oh, wait, you're a VB guy. You could still write code. No, no. I'm just a sharp guy now. I switched. So you couldn't write code. A while ago. All right. So if you guys can see my screen, what we're looking at is actually the Power BI desktop. So there's two basic interactions for Power BI. There is the desktop where I actually interact with my data, and I go out and do some data shaping, and remove characters, and do things like, I don't know. If you get it in US pounds, convert it to kilograms, data cleansing. And then if I want to share it and make it available, use the Power BI service. And we're going to go through both of those. So right off the bat, one of the areas we're going to use, we're going to show you how to get data from the web. So if I go ahead and can they see my screen right now? Or they can see it right here. OK. So I've got a URL right here that is from Wikipedia, and it's kind of the canonical what most people are doing with the get data and the web experience, and what we have added this week is. This week. Yeah, this week. So a new update of the desktop app. Yeah, we actually do. Which updates quite often? Every month. I have noticed. Yeah, we update both the service and the desktop every month. So what we've actually added this month is the ability to do a web view. Now, Wikipedia does a really good job of going ahead and giving their table names proper names that make sense in many cases. Most websites, you get this sort of experience. I think what was it, Table 115 was your favorite? Yeah, I love that table. That's a great table. So this week what we did was we give you this web view. Oh, look at that. Yeah, and I can go out and take a look at it. And what it's done is it's gone through and it's looked at different tables and said, we think you might want data from here or this is data that we can pull in. And one of the things I was kind of interested in is presidential elections are coming up. Matter of fact, there's a big party at my house for the MVP summit during presidential elections. There we go. Yeah. So I could load this in and I could use it as is. Or what I could do, as I was mentioning what the desktop lets us do, is go ahead and do some data transformations. So in this case, all of the percentages have come in as text because it added the percent sign on that table. So what I can go ahead and do is go ahead. So again, you grabbed a table off a website and brought it into Power BI. That's right. And you could do this with any table on any website as long as if they use divs and we don't recognize it as a table, we may not understand it. But if they're actually using a table, we'll let you have access to it. So in some cases, it'd be like, why are you not seeing it because I see a table? Yeah, it could be a graphic. It could be other things. So what I'm going to do is go ahead and remove. Oh, I did it exactly. No, I did it exactly right. I removed the percent sign. So now it can be treated as a text. It's from it being right aligned. You actually can see that it's not. So what we need to go ahead and do is say, I want you to change it to a whole number. And that actually should left one. So now we can continue doing this all the way through. And what it's done is it's given me the steps of what it's performed. So when we hit refresh, it's going to go through all those steps again. So that way, my reports look right at the end. You're talking about the gateway. That's what the gateway does. So I can go ahead and go back home and choose Close and choose Apply. At this point, I could do things like most recent polling and, I don't know, state nationwide and drag it over. And it knows enough to know about states. And we could dig into it. But that's not really developer stuff. Let's see if we can actually take a look at these rest endpoints. Now the one that I've been really interested in, because I've been doing a lot of user group stuff lately, is Meetup. So that's how I track all the user groups I go to and whatnot. So we're going to go ahead and go back to get data. We're going to go back to the web, just like we did a second ago. And what most people don't know, I don't even know if it's very well documented other than my blog posts, I'm actually giving the Meetup end point with my key. So if you guys might want to zoom that in and grab my key that way, I'll be changing it after this video. So that's not going to do you guys much good. Meetup makes it really easy. It doesn't cost anything. You just say, give me a key. And it joins you to their developer Meetup as well. So that's a RESTful API that you've now called. That's right. So it could be a public API. It could be your own web app. Yeah, because I can actually build. I didn't show that. But in the web call, I can actually go out and use basic windows auth. I can actually go ahead and authenticate. Oh, cool. Yeah. OK. At this point, it's going out and saying, hey, I've got some JSON. What do you want to do with this? So I'm going to go ahead and say, I want, oops, to make it into a table. And I'm going to say, you deal with the wearers as you see fit. And at this point, I can go ahead and take a look inside that JSON. That's pretty cool, huh? Yeah. I know this part of my code took up most of that foreign line. So it's just getting this list of what I wanted to do with it. I'm not going to preface this. Well, now there's a feature recently added in Visual Studio, or at least recently discovered by me, where you could take JSON and create a C-sharp class from it. I did not know that. Yeah. Did you guys do a toolbox on toolbox? I think we showed it once in a toolbox. Yeah. I'll have to look it up. OK, so what we've done at this point is all of the ones at the parent root or the parent node have expanded out. So I love this one. FNG Monthly Meeting. Monthly Meeting. Looks like it actually was an Oslo meeting that somebody messed up. And if we scroll across, you'll see that some of these are actually columns inside of that JSON parent. So there's a child members. And once again, it's asking, hey, do you want to expand these all out? I am no expert of the JSON for Meetup. So I just expand everything and then delete them as I see fit. And then what it does is it just kind of replays that. Yeah, I might be bringing it across more day than I need, but probably not. At this point, I am going ahead and saying, using original name as column when I unselect before, because I know it uses ID and name a couple different places. So I'm going to have things that are called, I think it's venue.name, venue.id. OK, at this point, I think there's actually a group one. Yeah, there we go. I'm going to do the exact same thing with group. So we're going to expand this out. At this point, let's go ahead and do exactly like what we did before. And that's it, guys. We're done. You want to visualize it, don't you? You should do something with this data, yeah. Let's do something with it. OK, let's go ahead and take into a brand new pane so we actually don't have to fight with it. Collapse that most recent polling data. Looks like we brought it in twice, maybe earlier. And we'll call this one Meetup, because that way we don't get confused later. Otherwise, we won't be able to fight it. Expand it out. And let's grab that map that we had before. There we go. Make it a little bit bigger. And I want to see where my Meetups are at. I know that one was in Oslo. And I kind of know where Oslo is. But for us, US geographic challenge, it helps out a lot to see where we're at. And I think it's actually under Venue that has these fields. So I can go ahead and go Venue.Long, here's one. And I can put it here, Venue.Long, put it there. And it's showing me the distribution of the Meetups that I belong to. It's interesting that eight years in Australia, and I don't belong to one there, I think I may be excommunicated. I don't know what's there. Because I know there's like three Meetups that I do go to on a fairly regular basis, virtually. At this point, let's go ahead and maybe take a look at their size by how frequently they're meeting. So obviously, somebody, I think Chicago, Wisconsin, someone in the middle of the country is meeting quite often. Somebody off the coast of Africa are crazy busy. Cruise ship. Yeah. Let's go ahead and take a look at what's been going on over there and take a look at that. So I'm going to put a table in here. Let's not do that. Put it back here. We'll put a table below it. There we go. And we'll actually pull out some of these, like group.name and some of those other things. So where's a group.name? There it is. And there's my Meetups that I go to on a regular basis. Probably want to figure out how to get to them and details about it so I could go ahead and drag over the link itself. And you'll notice it's not hyperlink. So we probably need to do some more of that data cleansing I messed up on to begin with. So we'll go out of modeling, change that to data and web URL. And it should. There you go. And one of my favorite visualizations is called the Attribute Slicer. It looks like I don't have it here. So I'm going to go ahead and import a custom visual. We have slicers built into the product. This one actually lets me do keyword searches and it'll show me by volume which ones are there. And you'll see that it's the only one I've got there. So obviously it's pretty important for me. Bring that one over. And I could go ahead and take a look at, I don't know, maybe their name. And actually that's not going to be very useful because that's only going to give me a one-for-one instance. Let's go out and maybe take a look at their city. So venue.city, put that there. And we'll go out and count the times that each city is. So the Denver guys, that must be the ones right here, are crazy busy. And the guys in Tampa are crazy, crazy busy. The guys in Oslo, which is not, oh, that must be Riga. It's actually what this one must be. Why don't we not see it? Anyways, so what I can do here is I can go ahead and say, I only want to see those in Denver. It actually should be filtered down. Or I could go out and say, I want to see all those with, I don't know, ED. I only have one in Redmond. And it actually is showing me those two. And of course, if I want to bring these off, I can go ahead and take them back out and take the text back out. And it's showing me all of them once again. So again, pretty cool stuff. Now, as a developer, having it inside of somebody else's ID isn't going to work. Well, first of all, as a developer, this is amazingly cool that you can build these types of reports without having to learn reporting languages and whatnot. So right, so as a developer, I've built this. Now, how would I put it into AppSite Build? OK. So as we mentioned, we're in the desktop experience. So let's go ahead and save this. We'll actually save this as Toolbox. And make sure you remind me it's in Downloads. I tend to lose things in webinars. I don't know why. And now, if I go ahead and go back into my browser, and you'll see that this is actually the online instance, or the online experience for Power BI. And I have this dashboard already here. And what do I need to be able to get to this? It's free? Is it cost money? So this is free. This is free. The desktop is free. Power BI, desktop is free. Does that seem like a good price? Yeah. I like free. Free is a good price. Now, there are features in there that do cost money. And the one that I'm going to show you next is published to web. Actually, you need to have a pro license. OK. So that's what? Thousands of dollars? Thousands of dollars. Would you pay me that? No, it's $9 a month. Oh, that's pretty reasonable. Matter of fact, if you're an E5 customer, which is an Office 365 thing, I think, you already have it. So there's a lot of people that already have this that don't know. They don't have to spend that $9 a month. So this is the webinar I did this morning on all kind of the new cool features for the data scientists and whatnot. But what I did was I clicked down here in the bottom. And I've seen it. It said, get data. And it's asking me, which data? In this case, I'm going to go ahead and grab that file that we were just working on. And there it is. I didn't lose it this time. I like it when I don't lose files. And what this is going to do is, back underneath my August workspace, under data sets, you actually should see something called Toolbox. And there it is. Now, is this live on the web? Or you're just looking at your own individual copy of it? So that's a great question. By default, everything is secured inside of Power BI. Nobody has access to it except for whoever's logged in, which happens to be me. Now, I can share this. And the way I could do it is at the group level. And it has to be within my org. Or I can share it with people who are in a AD federated organization as well. Or not federated, so I strike that. AD-backed organization, they do not need to be federated. But they do have to have Power BI. And when you go in and you say share, you just type in their email address, they get an email, and they say yes, accept. So again, it doesn't need to be federated, but they do have to have a Power BI account. Great question. But that's not very useful for broadcasting your website to the planet. No, that'd be good if you're building an internal line business app or something, or sharing with a group of friends. Because you can go in Azure and create an AD tenant as part of your Azure subscription. So you could do that. Yes, and you could go out and add people to it. And you could have them have access to it, but they have to remember those credentials. So that's the sharing at the AD level, sharing at the, you have your own AD, but you have a Power BI. And now I'm going to go all the way up to, I'm going to make it available to everybody. And we'll talk about the middle space in a second. OK, so I'm looking at a report. And I'm going to go ahead and go File, Publish to Web. We made this available back in May. It was in the May when we made this available. So I'm going to say Create an Embed Code. And obviously, this URL will work right now for everybody in the planet. So I can copy this and go right here. Not a great test because this browser is in that identity. But it does work, and you guys can try this. But I'm going to give you an easier way of doing this. I'm going to go ahead and get back to. So go back to that. That's, go back to where you just were. There's your report on the web. And you'll notice there's none of the Power BI Chrome is available. It is a standalone. It's still interactive. So anybody could enter that link or the shortened link that you created to not make people type that. And they would see this report. That's right, right now. But we're going to do something. Yeah, we're going to do something easier. So what we're going to go do is we're going to grab this, copy that, and set it up right. And probably, yeah, that sounds right. OK. And we can actually change that as well. You don't have to have it set those sides. And what we're going to do is, I don't know, if you read my blog. I know most people don't. I think my mom's the only person that reads my blog. But I actually did. I was so excited when you invited me. I actually did a shooting visual studio. You read that? You did? Saw that, yeah. And I mentioned your wife? Alison noticed that you called me old? Oh, friend. And I called your wife beautiful. Yeah. You got half of it, right? I got half of it, right. Actually, you got them both right. So what I'm doing here, guys, is I'm going into WordPress, modifying this blog post. And I'm going to go ahead and, if I have that iFrame still on the keyboard buffer or the clipboard, there it is. So let's go ahead and update this. And what we should see is this as part of my blog, which, of course, can be made available to any web app. Any web app. So if you're building any web app as a developer, then you just use that iFrame and stick that report in. That's right. Very cool. Now, for those of us that don't do web apps, what about desktop apps, WPF, Win10, mobile apps? Do we do the same thing here? All right, so we have a mobile client that you can download from the store right now. And we can actually make this available to our mobile apps as well. So you could actually go out and say, hey, I want to access this as a mobile app. The team who does Embedded, what we need to talk about, Power BI Embedded, is actually working on a UWP client. So you can actually go out and do a native client. So that would be a control that you can put into your. That's what the plan is right now. And I know they're working on it. Yeah. But let's talk about what Power BI Embedded is versus sharing a workspace or a dashboard versus a publish to web. So if you remember, publish to web, this is available to everybody. This should scare some people, the security people, that they can go in, right click, and say publish to web. Now, if it makes you feel any better, it is actually a setting that, let's go back into a browser. That's not a browser check. Go into the Power BI service, and go into Admin Portal. And the very first tenant setting, I think what you've got, is allow sharing to external users and publish to web. So you can turn those off and on. I've turned them on for this demo. And what you can also do between sharing to Active Directory back people that you specifically trusted, and the world, is you could use Power BI Embedded, which actually lets you go ahead and create groups and resource groups in Azure, and actually go out and trust other people with distinct links using, they're actually using API keys to do that. So using this API key, you can have access. So you have the world, AD back people I know, and in the middle with Embedded. And Embedded actually is the one that we're doing with the UWP client that we're building on. So this is kind of what I wanted to show you. I thought it was pretty cool. Yeah, this is very cool. So if you guys haven't tried Power BI, you should absolutely start playing around with it. It's very cool. And the ability to just create these amazing reports and then embed them in your web apps. And we may do a follow-up show where we actually put a report in a client app. Okay, that sounds good. And I can do that, or Josh Kaplan. So Josh Kaplan owns the Power BI Embedded. And he has all kinds of videos on it as well. He's actually the go-to guy that I talked to for Embedded, which is, again, different than published about, which is what I showed. So where can people learn more about Power BI, how to use it? Powerbi.com, without a doubt. Okay. We do two webinars a week. And I actually drag the team out and say, hey, this is the feature I worked on. Cool. Yeah, and this morning, it was actually me going out and talking about the August update. Next Tuesday is Lukash, who's talking about how we did the Real Soledad reports. And he did all that work. He actually talked about how we did the King Five presidential storyboards. And that's all done with published to web, all of those things. And he talks about some of the design patterns that I clearly am showing that I am not a designer. The other thing that would be really cool to come back to is that new cottage industry around sentiment tracking or our brand analysis. I know we at Microsoft spend a lot of money to actually take a look at what you feel about us. Right. And we've spend it on software vendors. And it's actually not that hard to call the Twitter API, put that data into a SQL data warehouse and actually get reports like this. So I think if I can talk you into scheduling me to come back and talk about putting it into a native app and a different session on doing brand analysis or sentiment analysis, and you could go out and see like my inbound tweets. This is how many people care about me. Outbound tweets, I'm a little bit more verbose. And of course, what you're interested in is who's talking about you and of course, their sentiment. So this is actually all done with Azure Machine Learning. Nice. And this is actually a free template that we make available for download. Cool. Very cool. We'll do an episode where you come back and you'll show us and we'll track this show and see how we do. That'd be great. Because that might go in the category of never asked questions, you don't want to hear the answer to, but we'll see. We'll see. All right, hope you had fun with that and we'll see you next time on Visual Studio Toolbox.