Advertisements

App for Power BI REST APIs for Streaming Data

In this post we will see how to create app to use the Power BI REST APIs for Streaming Data.

Full documentation: https://powerbi.microsoft.com/documentation/powerbi-service-real-time-streaming/

To run this app follow the steps discussed in my previous post: [Real-Time Dashboard Tile & Streaming Dataset– in Power BI]

Summary as below:

  1. Go to app.powerbi.com
  2. Go to streaming data management page by via new dashboard > Add tile > Custom Streaming Data > manage data
  3. Click “Add streaming dataset”
  4. Select API, then Next, and give your streaming dataset a name
  5. Add a field with name “Customer ID”, type Number
  6. Add a field with name “Customer Name”, type Text
  7. Add a field with name “Sales Value”, type Number
  8. Click “Create”
  9. Copy the “push URL” and paste it as the value of “realTimePushURL” in below app

We will start with new project in Visual Studio.

RealTimeSync-12

Create a new Visual C# Console Application.

Open the Program.cs File and write a code as shown below.

This app Uses the WebRequest sample code as documented here: https://msdn.microsoft.com/en-us/library/debx8sh9(v=vs.110).aspx

RealTimeSync-13

For your easy here is the code of Program.cs below:

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Net;

using System.IO;

 

namespace RealTimeStreaming

{

class Program

{

// Paste your own push URL below as obtained from while creating Streaming Dataset and saved in step 9 above

private static string realTimePushURL = “https://api.powerbi.com/beta/4e7ca966-123e-4ce7-9833-3e858854b98f/datasets/7d154cd7-11e0-4d5e-9569-12fa3f82f224/rows?key=mD1nkJOf426PjPPaEQsW9xEg%2FN1EENQ2hRZvXIpHr%2BTXNk3XQpKsR2Jbe5CATiMoLmxjlzSp%2FIMlbe9HL8G4xQ%3D%3D”;

static void Main(string[] args)

{

while (true) { //Set Infinite Loop

try

{

// Declare values that we will be sending

Random r = new Random();

int currentValue = r.Next(0, 100);

String Name = “Dummy Name”;

// Send POST request to the push URL

WebRequest request = WebRequest.Create(realTimePushURL);

request.Method = “POST”;

 

//Here you will retrieve the data from the source and format as per the request.

//In this example we are sending Random Value generated by above code for testing purpose.

string postData = String.Format(“[{{ \”Customer ID\”: {0}, \”Sales Value\”:{1} }}]”, currentValue,currentValue);

Console.WriteLine(String.Format(“Making POST request with data: {0}”, postData));

 

// Prepare request for sending

byte[] byteArray = Encoding.UTF8.GetBytes(postData);

request.ContentLength = byteArray.Length;

// Get the request stream.

Stream dataStream = request.GetRequestStream();

// Write the data to the request stream.

dataStream.Write(byteArray, 0, byteArray.Length);

// Close the Stream object.

dataStream.Close();

// Get the response.

WebResponse response = request.GetResponse();

// Display the status.

Console.WriteLine(String.Format(“Service response: {0}”, ((HttpWebResponse)response).StatusCode));

// Get the stream containing content returned by the server.

dataStream = response.GetResponseStream();

// Open the stream using a StreamReader for easy access.

StreamReader reader = new StreamReader(dataStream);

// Read the content.

string responseFromServer = reader.ReadToEnd();

// Display the content.

Console.WriteLine(responseFromServer);

// Clean up the streams.

reader.Close();

dataStream.Close();

response.Close();

}

catch (Exception ex)

{

Console.WriteLine(ex);

}

// Wait 5 second before sending

System.Threading.Thread.Sleep(5000);

} //Infinite Loop ends here.

}

}

}

Compile and Run the Program.

RealTimeSync-14

Leave the Program Running and switch to Power BI dashboard. You will see your newly created Tile in previous post will be displaying the Random Value generated by this program updating every 5 seconds.

That’s all with little tweaking to this program you can fetch your data and send the updated data to your Real Time Streaming Dataset.

That’s end to this post.

I will come up with more details in my upcoming posts.

Till then keep Exploring and learning.

 

 

Advertisements

Real-Time Dashboard Tile & Streaming Dataset– in Power BI

Power BI have introduced real-time dashboard tiles – a lightweight, simple way to get real-time data onto your dashboard. Real-time tiles can be created in minutes by pushing data to the Power BI REST APIs or from streams you’ve created in Azure Stream Analytics or PubNub, a popular real-time streaming service. Let’s see how we can do in no time.

Login to your Power BI using your credentials.

Go to your dashboard where you wish to add Real Time Streaming Tile, choose “Add a tile”

RealTimeSync-1

Select the “Custom streaming data” option

RealTimeSync-2

Click on Next.

RealTimeSync-3

At first usage you may not be having Streaming Dataset, if you have List will be shown.

Let’s create one for our Example, Click the link – Manage Data.

RealTimeSync-4

Click on Add Streaming Dataset.

RealTimeSync-5

From New Streaming Dataset, Select API and click on Next.

RealTimeSync-6

Add your Dataset Name, Fields and Datatypes.

Once you are done, Click on Create.

RealTimeSync-7

Copy your Push URL, we will require this to push data to Data Stream.

Click On Done.

RealTimeSync-8

Returning to our Previous Step, Now we can see Streaming Dataset Available.

Select your Dataset and Click on Next.

RealTimeSync-9

Select the Type of Visualization you want, and Fields to display.

Click on Next.

RealTimeSync-10

Give Title, Subtitle to your Tile and click on Apply.

RealTimeSync-11

Bravo, you are done, your Tile will be added on your Dashboard.

But hold on, the Value will not come until you add logic to push data to the Tile.

Now we will move to our Next Step, where we will create a program to call Power BI REST API and push Streaming data to our Dashboard. Checkout my next post for same. [App for Power BI REST APIs for Streaming Data]

Till then keep Exploring & Learning. I will return soon with my next post.

 

Working with Alerts in Power BI

Knowing about changes to important metrics quickly some time can help you taking quick decisions or help you keep eyes on things you care most.

With data driven alerts in Power BI, you can now get notifications when a metric you care about on your dashboard exceeds a set threshold.

Alert notifications will be sent to you as an email, and appear in your notification center on the web and in mobile apps.

You can set alerts for your numeric tiles featuring cards and gauges only. You have control over how often you want to be notified about your data, and whether you want to receive an email when your data goes beyond the limits you set.

Only you can see the alerts you set, even if you share your dashboard.

Alerts only work on data that is refreshed. When data refreshes, Power BI looks to see if an alert is set for that data. If the data has reached an alert threshold, an alert is triggered.

Alerts only work with numeric data types.

Alerts only work on data that is refreshed. They do not work on static data.

Today we will see how to work with Alert feature in Power BI.

Login to your Power BI using your credentials.

Switch to your Dashboard.

I have one ready to use dashboard from my previous post to show Alert feature I am using the same.

As discussed above it works only for Numeric & Gauges Tiles only, for others you will not get even the Alert option.

Luckily I have one on my Dashboard, if want to learn how to create Numeric Tiles or more details on working with Power BI you can refer to any of my previous posts on Power BI. However you can find here one direct Link to the topic in question.

You see I have selected my Numeric Tile in below screen shot.

DataAlert-1

How to Set Data Alerts:

From a dashboard tile, select the ellipses.

Select the bell icon  to add one or more alerts.

DataAlert-2

Click on Add Alert Rule.

To start, ensure the Active slider is set to ON, and give your alert a title.

DataAlert-3

 

Set your Condition, Threshold, and Notification Frequency also don’t forget to tick on send me mail too.

Click on Save to save your Alert.

 

Receiving alerts:

When the data being tracked reaches one of the thresholds you’ve set, several things will happen.

Power BI checks to see if time have lapsed or more than depending on the option you selected since the last alert was sent.

As long as the data is past the threshold, you’ll get an alert every hour or every 24 hours depending on option you selected.

If you’ve set the alert to send you an email, you’ll find something like as shown in below screen, this in your Inbox.

 

DataAlert-4

 

Power BI will add a message to your Notification center and adds a new alert icon to the applicable tile as shown in below screen.

DataAlert-5

 

Access to your Notification.

DataAlert-6

 

 

Manage alerts:

There are three ways to manage your alerts:

From the dashboard tile

From the Power BI Settings menu

On an individual tile in the Mobile App

DataAlert-7

 

As we have seen above how to create Alerts follow same steps to access Alert Window.

At the Left click on Expand make Necessary Modifications and save.

At the right select the trashcan to delete the Alert.

Select cancel to return to previous window.

 

DataAlert-8

From here you can turn alerts on and off, open the Manage alerts window to make changes, or delete the alert.

 

That’s all for today.

I will come up with more details in my upcoming posts.

Till then keep exploring and learning.

 

 

Working with Project “Madeira” Content Pack for Power BI

In today’s post we will see how to use Power BI Content Pack for Madeira.

The content pack is preconfigured to work with sales data and financial data from the demonstration company that you get when you sign up for the Project “Madeira” preview.

To see your Project “Madeira” data in Power BI, you must have the following:

  • Access to Project “Madeira”.
  • Access to Power BI.

Before we start with connecting we will collect few information that we will require while connecting the Power BI to fetch data from Madeira.

User Name

Web Service Acess Key

Note down both value, if you don’t have Web Service Access Key Generate one and set appropriate Expiration date or Set Never Expire as shown below.

PowerBi_Madeira-1

Next open the Web Service Page.

Make sure all selected Web Service is running as in below screen.

The data is extracted from your Project “Madeira” company using web services to read live data. In Project “Madeira”, the Web Services window lists the web services that have been set up for you, including the following that are consumed by the content pack in Power BI:

  • ItemSalesAndProfit
  • ItemSalesByCustomer
  • powerbifinance
  • SalesDashboard
  • SalesOpportunities
  • SalesOrdersBySalesPerson
  • TopCustomerOverview

Note: If you change the name of any of these web services, the data will not show up in Power BI.

Note your URL of OData. Edit it to follow the format one shown in below screen.

PowerBi_Madeira-2

Now we have all our required information.

Open Power BI site and Get Data from Services as shown in below screen.

PowerBi_Madeira-3

Select Project “Madeira” Content Pack and click on Get.

PowerBi_Madeira-4

Enter the URL of Web Service we get in above step.

PowerBi_Madeira-5

Select Next.

Select Authentication method as Basic.

In User Name enter your user name as obtained in above step.

For Password ented the Web Service Access Key as obtained in above step.

PowerBi_Madeira-6

Choose Sign In.

After few minutes/seconds churning you will be ready with your first Dashboard from Madeira.

PowerBi_Madeira-7

Troubleshooting

“Parameter validation failed, please make sure all parameters are valid”
If you see this error after you enter your Project “Madeira” URL, make sure the following requirements are satisfied:

“Login failed”
If you get a “login failed” error when you log in to the dashboard, using your Project “Madeira” credentials, then this can be caused by one of the following issues:

  • The account you are using does not have permissions to read the Project “Madeira” data from your account.

    Verify your user account in Project “Madeira”, and make sure that you have used the right web service access key as the password, and then try again.

  • The Project “Madeira” instance that you are trying to connect to does not have a valid SSL certificate. In this case you’ll see a more detailed error message (“unable to establish trusted SSL relationship”).

    Note: Self-signed certificates are not supported.

“Oops”
If you see an “Oops” error dialog after you pass the authentication dialog, this is most frequently caused by a problem connecting to the data for the content pack.

Thats all for today’s post.

I will comeup with more details in my upcomming posts.

Til then keep exploring and learning.

 

Happy First Birthday to Power BI!

One year ago, on July 24, 2015, the new Power BI service was released, Power BI Desktop, and Power BI Mobile as an innovative cloud-based business intelligence solution.

At the time of the launch, Microsoft Corporate Vice President James Phillips wrote that “Power BI sets the standard for modern business intelligence”.

You can read more on :- https://powerbi.microsoft.com/en-us/blog/happy-first-birthday-to-power-bi/

I have written several posts for beginers you can find here:

In case you have missed my previous posts here I present the link to all previous posts below.

Microsoft Power BI – Part – I

Introduction to Power BI and Creating Report from Excel Data, Local Files.

Microsoft Power BI – Part – II

Introduction to few Features of Power BI

Microsoft Power BI – Part – III

Power BI Desktop, Creating Dataset & Reports from In Premise Database installation

Microsoft Power BI – Part – IV

Power BI Gateway usage

Microsoft Power BI – Part – V

Scheduling Refresh of Dataset & Report created using In Premise Database

Microsoft Power BI – Part – VI

Power BI Content Pack

Microsoft Power BI – Part – VII

Power BI Mobile App

Microsoft Power BI – Part – VIII

Power BI Content Pack

Microsoft Power BI – Part – IX

Power BI Publisher for Excel

Microsoft Power BI – Part – X

ANALYZE IN EXCEL.

Search the Blog site with PowerBI tag and you will find more posts explaing about PowerBI features and capabilities.

I will comeup with more details in my upcoming posts.

Till then keep exploring & Learning.

 

 

Plug & Play – Power BI and Jet Enterprise in NAV 2016

This is where Power BI and Jet Enterprise really shine – they have the ability to understand NAV because they have little bundles of interpretation packs that can interpret NAV for you!

Checkout more via below shared link :-

http://www.catapulterp.com/plug-and-play-power-bi-and-jet-enterprise-in-nav-2016/

Microsoft Power BI – My Organization Content Pack Library

Continuing from my previous post. Today we will discuss about Content Pack Library (My Organization) in Power BI.

In case you have missed my previous posts here I present the link to all previous posts below:

Microsoft Power BI – Part – I

Introduction to Power BI and Creating Report from Excel Data, Local Files.

Microsoft Power BI – Part – II

Introduction to few Features of Power BI

Microsoft Power BI – Part – III

Power BI Desktop, Creating Dataset & Reports from In Premise Database installation

Microsoft Power BI – Part – IV

Power BI Gateway usage

Microsoft Power BI – Part – V

Scheduling Refresh of Dataset & Report created using In Premise Database

Microsoft Power BI – Part – VI

Power BI Content Pack

Microsoft Power BI – Part – VII

Power BI Mobile App

Microsoft Power BI – Part – VIII

Power BI Content Pack

Microsoft Power BI – Part – IX

Power BI Publisher for Excel

Microsoft Power BI – Part – X

Analyse in Excel (preview)

PowerBI-47

Login to Power BI using your credentials.

OrgPowerContent-1

Select Get Data.

OrgPowerContent-2

From Content Pack Library section select Get Data under My Organization.

OrgPowerContent-3

Select Create content pack.

OrgPowerContent-4

This is the part where majority of work to be performed.

In First Section – Choose who will have access to this content pack

You have 2 option

  1. You can share with specific users or Groups, since your AD is in sync with your in premise AD you can select them.
  2. You can share with your entire Organization.

Select the Group or Users if you go with first option.

In Second Section – Provide Title for you Content Pack

In Third Section – Provide detailed Description for your content pack.

OrgPowerContent-5

In Fourth Section – You can select Image for your content pack.

Finally in Fifth Section you will define what all content you want to share for the user using this content pack.

Here all available contents are divided under 3 sections (Dashboards, Reports & Datasets).

When you select Dashboard all included Reports and Dataset will be shared by default.

When you select Reports all included Datasets will be shared by default.

When you select Dataset only that will be shared.

You can select combination as you desire.

I will provide write up why we will select selective contents to share with case study, in my future post some time other.

Once you are done with all above step you are good to Publish the Content Pack.

OrgPowerContent-6

If we revisit the Get Data option again for My Organization, we can view our Published Content Pack which we shared with others.

User can customize as per his need and Share with others in form of New Content Pack or as-it-is depends.

Good Example will be we have one Content Pack for My Organization which include all modules Dashboard, Reports and Datasets.

My IT will create Module wise Content Pack (Finance, Sales, Purchase, Warehouse, Manufacturing etc…) and share these content packs with concern department Heads. Further each Heads will create sub-content pack and share with their team with information which is related to them and so on.

 

That’s all for today, will come up with more information in my future posts.

Till then keep exploring and learning.

 

 

Now Power BI Added to Microsoft Trust Center

The Microsoft Trust Center provides a single point of reference for cloud trust resources, including documentation of our adherence to international and regional compliance certifications and attestations, privacy and data protection policies and processes, data transfer and location policies, and security features and functionality.

When you entrust your data to the Microsoft Cloud, you will have questions. Where is it? Who can access it? What is Microsoft doing to protect it? How can you verify that Microsoft is doing what it says?

For more information see this Link: https://www.microsoft.com/en-us/trustcenter

https://powerbi.microsoft.com/en-us/blog/power-bi-added-to-microsoft-trust-center/

The Power BI service is built on Azure, Microsoft’s cloud computing platform, and leverages Azure’s robust set of security technologies and practices. These help ensure that Power BI is resistant to attack, safeguards user access, and helps secure your data through encrypted communications.

As a Power BI customer, you know, through clearly stated policies and procedures, where your customer data is stored and how we help secure it, as well as who can access it and under what circumstances.

How to add Video Tile on Power BI Dashboard

Previously, a Video Tile released by BI supports YouTube videos. Video tiles allow you to customize your dashboard and add a bit of personal look.

Now the video tile supports Vimeo videos too.

Add a video tile by selecting Add widget from the top right of the dashboard.

PBI Video - 1

Select Video from Add Tile window.

PBI Video - 2

Press Next Button.

PBI Video - 3

Provide your Title and Subtitle for the Video Tile.

Provide your YouTube or Vimeo video URL.

If required provide custom Link and other properties.

Select Apply to complete your action.

Vimeo URLs come in several different formats this supports most, but not all of these formats. In case your URL doesn’t works try for next format.

I have posted several posts related to Power BI, you can find them using below Links.

Microsoft Power BI – Part – I

Introduction to Power BI and Creating Report from Excel Data, Local Files.

Microsoft Power BI – Part – II

Introduction to few Features of Power BI

Microsoft Power BI – Part – III

Power BI Desktop, Creating Dataset & Reports from In Premise Database installation

Microsoft Power BI – Part – IV

Power BI Gateway usage

Microsoft Power BI – Part – V

Scheduling Refresh of Dataset & Report created using In Premise Database

Microsoft Power BI – Part – VI

Power BI Content Pack

Microsoft Power BI – Part – VII

Power BI Mobile App

Microsoft Power BI – Part – VIII

Power BI Content Pack

Microsoft Power BI – Part – IX

Power BI Publisher for Excel

Microsoft Power BI – Part – X

Analyse in Excel (preview)

 

 

Project “Madeira” content pack for Power BI

Maderia1

Getting insights into your Project “Madeira” data is easy with the Project “Madeira” content pack for Power BI. Power BI retrieves your data and then builds an out-of-the-box dashboard and reports based on that data. This blog post announces the availability of the Project “Madeira” content pack for Power BI.

Check out this Link.

The content pack is preconfigured to work with sales data and financial data from the demonstration company that you get when you sign up for the Project “Madeira” preview. – Choose any visual on the dashboard to bring up one of seven underlying reports. – Filter the report or add fields that you want to monitor. – Pin this customized view to the dashboard to continue tracking. The dashboard and underlying reports refresh daily. You can control the refresh schedule and modify the frequency on the dataset.

The data is extracted from your Project “Madeira” company using web services to read live data. In Project “Madeira”, the Web Services window lists the web services that have been set up for you, including the following that are consumed by the content pack in Power BI:

  • ItemSalesAndProfit
  • ItemSalesByCustomer
  • powerbifinance
  • SalesDashboard
  • SalesOpportunities
  • SalesOrdersBySalesPerson
  • TopCustomerOverview

 

 

Previous Older Entries

Important

Most of the contents you find in this blog will be either inherited from MSDN or Navision Developer IT Pro Help. Some places images are also directly taken from these sites. Purpose is simple to try those stuffs and re-produce adding few things as per my understanding to make easy understanding for others and quick reference.

Here nothing under my own brand or authorship of the content. At any point of time we are just promoting Microsoft stuffs nothing personnel with same.

Hope stuffs used here will not violate any copyright agreement with them. In case by mistake or in-intestinally it happens and the Microsoft feels these should not be used Microsoft have full right to inform me about same and will be glad to take down any such content which may be violating the norms.

Purpose is to promote Navision and share with community.

FB Profile

Like FB Page

%d bloggers like this: