Create a Power BI streaming dataset for real-time dashboards

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
yo what's up this is Patrick from Guyana Q in this video I'm going to show you how to use PowerShell to push data to a streaming data set in power bi okay PowerShell streaming data sets what brought that up well wish I had a real-world customer scenario to bring you but I don't it was adam and i chatting about demos and stuff and somehow we said let's do a streaming data set and i said you know what that'll be cool I'm gonna write a console app using in c-sharp that'll push the data or maybe I'll use flow or maybe I'll use logic gaps maybe I'll use it he was like whoa wait a minute once you just use PowerShell it's like light bulb went off a light bulb just I was like yes yes yes I remember all right until I ran off to go do it right and so before you go off and do it think about what you want to string in this case I decided I wanted to stream I wanted to monitor the CPU and memory that's you know being used on my machine was like cool so I decided that and then the next thing now you can well you guys know how I like to do right talking too much is that all is talking head up with my laptop so once I figure out what I wanted to stream I logged in the power bi and I created the data set a streaming streaming data set so go to your workspace and you'll see a little create a plus a plus button labeled create go ahead and click it and then you'll see an option for streaming data set choose it and choose the first one choose API right as your stream is coming and popping up it's been there for a while click Next give it a name so let's call this monitor CPU excuse me and then make sure you turn historic analysis on if you want to connect to this data set in the desktop you need to turn this on and I didn't know maybe I wanted to create some report level measures and stuff like that but anyway anyway so turn it on turn it on if you want to follow along with me in the video all right and then you go ahead and say hey I wanted to date and you know time and CPU and memory you guys get it right you do it and you click create once you click create the data set will appear in your workspace and if you click the app info icon here you'll see there's the data set right there's a JSON that it's expecting and then there's some options for raw see URL and power shell right go ahead and copy this so what I did was I copied it and held on to it in my clipboard and then I click this little icon right here the creat create report icon on that data set and I built a little report I'll show you what the report looks like so I built a little report kind of rough didn't do a whole bunch of work on making it look pretty but there was a line to a line chart with both of the values the CPU and memory here and then four cards one for average one for average for both CPU and memory and one for average from both CPU I mean max for both CPU and memory ok then I created a dashboard I just pinned all of this stuff on the dashboard and you can see my dashboard okay so there's nothing going on on my dashboard and so remember I was going to write console app I was gonna use some c-sharp right now I can write a little code a little bit or I was gonna use float which is super easy or logic apps or something to start pushing this data to a write of a cursor now I know Kirsten it's no cursus but anyway you guys get what I'm saying right so but instead write it produced this PowerShell so I opened up a partial window and I paste that little piece of code that power bi provided for me the service provided for me and if you take a look right it gets the endpoint so here's the URL for the data set and then here's the payload that I'm going to pass right these are the remember the four values that I decided I want to capture there they are and I send it assign some default values to them right some just persisted some values and then it just called invoke rest method and it passed the endpoint and the body of that JSON to it so let's go ahead and run this so let's run this so I'm gonna run it so we'll run this and go back over to power bi and we have one little dot on our lot both of our line charts and some values in the car right just cool so then I wrote a little PowerShell script which you guys will have access to all you PowerShell experts out there don't you know don't make fun of my code if you if it's if you make it better send it back to me right I'd appreciate it all right so if you take a look at this little piece of code that I wrote right here right so it's just a infinite loop I'm capturing the CPU the memory the date and time and then I'm calling the exact same thing just replacing those hard-coded values with my dynamic values okay so we're gonna go ahead and run this so let's go ahead and run this little piece of code right here and we'll go back over to our dashboard and power bi and now you can see it's already getting some values right it's already doing some stuff and I'm excited about it scan there's my average memory there's my maximum memory my maximum CPU let's see if we can spike this CPU a little bit I'm just gonna go ahead and open up visual studio a little give it a little bit to open up my Visual Studio do its thing look at look at CPU it already spiked out at 63 93% it'll come back down want to be Visual Studio settles down pretty cool pretty easy what do you guys think have you done this before have you seen this before how are you doing it right now all right got any questions comments post them in the comments below this is your first time visiting a guy in the cube channel you know what to do hit that subscribe button if you like my video - thumbs up as always from Adam and Patrick thanks for watching see you in the next video one more she'll give them another give them options
Info
Channel: Guy in a Cube
Views: 99,017
Rating: 4.8987641 out of 5
Keywords: power bi streaming dataset, power bi streaming dataset api, power bi streaming dataset example, power bi streaming dashboard, power bi streaming data, power bi, power bi api, power bi dashboard, power bi dashboard examples, power bi dashboard tutorial, power bi powershell, power bi powershell script, streaming, business analytics, microsoft flow, powershell, real time
Id: rjXJ0GSUMBg
Channel Id: undefined
Length: 5min 45sec (345 seconds)
Published: Wed Feb 06 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.