Get in touch with us!

Streaming Datasets in Power BI with Twitter

Power Platform | Ah, yes. The mighty Power Platform in which your imagination is usually the biggest obstacle. Today my creativity stretches from Twitter to Power Automate and into Power BI. The best part of this blogpost is that you can do this yourself and it’ll take less than 15 minutes. Promise! (Might need Power BI Pro, but who could live without that anyway?).

If you want to skip right to my results, just click on the picture here to get redirected to my published Power BI report.

 

What are we even doing today and why??

We’ll be creating our own real time stream of tweets into a Power BI Report! Well, real time being of by up to 30 minutes or so as it takes some time from a tweet is published before it’s triggering Power Automate.
We’ll be doing it because it’s possible. Simple as that!

 

Create a Power BI Streaming Dataset

Head into powerbi.com, login and choose your workplace! For this, I’ve simply created in my own workspace.
Go to “Create” in the top right corner and choose Streaming Dataset.

Go with API and just hit Next.

Name your dataset something fancy and name a few fields. One will be a number and hold the amount of tweets while the others will hold different kind of date fields.

(For streaming datasets, you can’t create new columns in DAX in Power BI, that’s why I create them in the dataset from the beginning).

If you don’t select the “Historic data” you will only keep your data for 1 hour. Perfect if you just want current data, like last hour trends of how many people who’ve passed through a door or amounts of calls to the servicedesk.

That’s it folks! You’ve created your own streaming dataset. If you’re fluent in PowerShell, you have some code ready down below.

If you’re like me, and prefer codeless, we’ll head into Power Automate for our magic!

 

Getting the tweets

Create a new Flow in Power Automate that triggers by a new tweet.

You may want to use a more active account than mine or you might want to use the hashtag for your company. You can of course use several as well to get some more data in there.
Next step – Add row to a Dataset.

Choose your dataset in the lists. When done, you’ll be presented with your fields from the dataset.

Allright, fill in what you want in each field. I’ve been using expressions here to get weeks, month and so on.

Copy with pride!

Date:
formatDateTime(triggerBody()?[‘CreatedAtIso’] , ‘yyyy-MM-dd’ )

DateTime:
formatDateTime(triggerBody()?[‘CreatedAtIso’] , ‘yyyy-MM-dd HH:mm’ )

Year:
formatDateTime ( triggerBody()?[‘CreatedAtIso’] , ‘yyyy’ )

Week:
div ( dayOfYear ( triggerBody()?[‘CreatedAtIso’] ) , 7 )

Month:
formatDateTime(triggerBody()?[‘CreatedAtIso’], ‘MM’) – formatDateTime(triggerBody()?[‘CreatedAtIso’] , ‘MMMM’ )

Ladies and gentlemen. We have now officially started filling up our Streaming Dataset with information! Please take a moment to appreciate how simple this was before moving on.

 

Creating your Power BI Report

Finally we’re heading into the comfort of Power BI Desktop. If you haven’t installed it (haha, who doesn’t have Power BI Desktop installed?), you can download it from Microsoft Store.
When you start the program, login using your Office 365 account. Then just click “Get Data” in the left corner.

 

Search for Power BI and select Power BI Dataset from the list. Click Connect.

 

You’ll get a list of all your datasets and since I assume you have several hundreds, searching is a good idea. Click on your dataset and hit OK.

 

That’s pretty much it! Now it’s just a matter of moving our data onto the workspace and create some magic!

 

 

Mine turned out something like this. I’ve published it to the web here so you have a look!

 

 

Hope this inspired you to try out streaming datasets! Feel free to reach out and tell me if you build something awesome out of this.

And if you get stuck, I’m of course available to assist. Cheers!

Trackbacks/Pingbacks

  1. First one out! | Cloud + Adapt = Cloudapt - […] https://www.altitude365.com/2019/11/26/streaming-datasets-in-power-bi-with-twitter/This post is about setting up a simple streaming Dataset for Power BI. With a streaming dataset you can…

Submit a Comment

Your email address will not be published. Required fields are marked *

Starkare tillsammans

Bolag inom både publik och offentlig sektor efterfrågar en alltmer kostnadseffektiv, platsoberoende och säker digital arbetsplats. Därför går nu Altitude 365 och Uclarity samman och bildar ett gemensamt specialistbolag.
Fortsätt på Altitude 365Kolla in Exobe

Altitude 365 + Uclarity – Årets Modern Work Partner!

Vinnaren är ett bra exempel på hur en “Born in the Cloud” ständigt förbättrar sitt erbjudande, arbetar nära och proaktivt med Microsoft för att hjälpa kunderna på deras digitaliseringsresa. Plus att vi på Microsoft verkligen ser fram mot den nya bolags-konstellationen (Altitude 365 + Uclarity) för ett “Starkare Tillsammans”.

Uclarity och Altitude 365 - Starkare tillsammans

Uclarity är specialister på digitala möten, telefoni, kontaktcenter och digitalt arbetssätt. Altitude 365 är specialister på säkerhet, mobilitet och hur bolag kan optimera resan till Microsoft365. Nu gör vi gemensam sak och bildar bolag tillsammans.

– Pandemin har tydliggjort behoven av en modern digital arbetsplats och vi har diskuterat ett samgående med Altitude 365 under en längre tid. Våra kunder har behov av specialistkompetens och tillsammans blir vi en ledande specialist inom Digital Workplace-området, säger Niklas Olsson Hellström, VD Uclarity AB.

Tommy Clark, Partner, Altitude 365, kommenterar:
– Inget bolag köper det andra utan båda bolagen får lika stora delar i det nya bolaget. Vår ledstjärna är att vi blir starkare tillsammans och att vi kan hjälpa våra kunder under hela deras resa.
Målet med sammanslagningen är att kunna hjälpa kunder med både teknik och effektiva arbetssätt.

– Det är då våra kunder får önskad effekt av sin investering i den digitala arbetsplatsen, säger Niklas Olsson Hellström.

Båda bolagen har svenska och internationella kunder från både privat och offentlig sektor. Sammanslagningen resulterar i en organisation på 50+ anställda baserade i Stockholm, Örebro och Göteborg.

För frågor, vänligen kontakta;
Tommy Clarke, Partner, Altitude 365 AB, 0703-593854, tommy.clarke@altitude365.com
Niklas Olsson Hellström, VD, Uclarity AB, 0734-198016, niklas.olsson@uclarity.com

Fortsätt på Altitude 365Kolla in Exobe