Sampling the results of a query to be visualize in a line chart

This article is contributed. See the original author and article here.

Bucketing data by dynamic bucket size


 


When we create chart in Power BI or any other visualization, we have a limited number of datapoints we can plot.


Power BI samples the data according to the resolution and the size of the chart vs. the number of points.


This means that we may bring from ADX hundreds of thousands of points and Power BI will sample the data we bring and plot the sampled data.


What if we want to limit the number of points ourselves using a different method?


Power BI imposes a limit of 1 million rows returned by a single query so if you have more than a million values returned, you’ll have to reduce this number.


Even if the number of results is not over the limit, it will be more efficient to return a small number of rows instead of bringing a very high number of points and letting Power BI do the sampling.


 


Function that aggregates the data in a dynamic way


 


The scenario is a line chart using a date time column on the X axis and some value on the Y that we can average.


I created a KQL function that summarizes the data to limit the number of points using a dynamic bin size.


The function averages the values in each group of points.


Other ways of representing the values can use other aggregations like count, sum or more sophisticated methods


The function uses data from the help cluster.


You can create the function in any database you have access to.


.create-or-alter function conditional_Sampling(From:datetime,To:datetime,GranularityS:string=”5s”,MaxPoints:long=1000)


{


// Easier to use strings in Power BI and convert here


let Granularity=totimespan(GranularityS) ;


// Number of points is calculated based on the timespan and the known granularity in the specific table


let Points=tolong((To-From)/Granularity) ;


// The factor is the number of points represented as one point in the chart


let Factor=iff(Points <=MaxPoints,1,tolong(Points/MaxPoints)) ;


let Span=Granularity*Factor ;


// In this table we have an observation each 5s


cluster(“help”).database(“Samples”).SamplePowerRequirementHistorizedData


| where timestamp between(From..To) 


// Aggregate all points in Span to one average value


| summarize Value=avg(value) by bin(timestamp,Span)


}


 


 


 


 


 


 

March Update Blog

March Update Blog

This article is contributed. See the original author and article here.

Staying organized is one important factor in delivering projects on time and within budget. Two features released earlier in March are aimed at helping you in this regard. Read on to see what these features can do for you and your team.


 


 New Features:



  • Colors in custom field drop down~ Add colors to your custom fields for better visual organization of your project plans.


 


MicrosoftProjectTeam_0-1648854759855.png


 


 


 



  • Priority Field ~ Almost finished rolling out, set the priority of your tasks in Project for the web, to better help sort and prioritize your work.

  • Labels ~ Almost finished rolling out, add up to 25 different colored labels to your tasks in Project for the web for better visual organization.


 


Upcoming Features:


 



  • Guest Users ~ Add people who are not part of your Microsoft 365 Group to your projects & assign tasks to them. This can include external stakeholders such as vendors or partners.

  • Templates ~ Get a jump start on your projects with a set of built-in templates.

  • Task edit for Microsoft 365 users ~ Enable your users with Microsoft 365 licenses to edit tasks assigned to them from a project plan built in Project for the web.

  • Charts View ~ Visually assess the progress of your work through charts.

Meet a recent Microsoft Learn Student Ambassador graduate: Japhlet Nwamu

Meet a recent Microsoft Learn Student Ambassador graduate: Japhlet Nwamu

This article is contributed. See the original author and article here.

This is the next segment of our blog series highlighting Microsoft Learn Student Ambassadors who achieved the Gold milestone and have recently graduated from university. Each blog in the series features a different student and highlights their accomplishments, their experience with the Student Ambassadors community, and what they’re up to now. 


 


Today we meet Japhlet Nwamu who is from Nigeria and recently graduated from the University of Benin with a degree in Computer Science.


 


 


Student_Developer_Team_0-1646174920655.png


 


Responses have been edited for clarity and length. 


 


When you joined the Student Ambassador community in September of 2019, did you have specific goals you wanted to reach, such as a particular skill or quality? 


I’ve always loved being unique and making a difference. My goal when I joined the community was to do just that–empower thousands in unique ways and make a difference. Have I accomplished this? I can proudly say “yes”. With the support of this global community, I have empowered thousands and counting. The community has given me access to the right opportunities, the right people, and the right platform to accomplish this goal.


 


What were the accomplishments that you’re the proudest of and why?


They are so many of them I am grateful for, but here are just a few:



Why do these accomplishments matter to me? Before I joined the community, I was an introvert and never thought I would attain such milestones, that I would be able to empower people so much, but the community has allowed me to empower thousands of lives and inspire others in ways I never thought possible.


 


What are you doing now that you’ve graduated? 


I am currently working towards securing a job that would give me the opportunity to empower the lives of people around the world.


 


My goal for 2022 is to “democratize technology and make a difference”. I hope to do as much as I can. I’ve already started it and hope to continue with it.


 


If you could redo your time as a Student Ambassador, is there anything you would have done differently? 


I would have started empowering people earlier. As an introvert, especially in global spaces like the Student Ambassador program, I spent 5 months trying to find my feet, connect, and make friends before I hosted my first event, and I wish it didn’t take so long.


 


If you were to describe the community to a student who is interested in joining, what would you say about it to convince him or her to join? 


“Love to empower lives and make a difference? Then join the Microsoft Learn Student Ambassadors community.”


 


What advice would you give to new Student Ambassadors? 


You have an amazing and solid support system in the community. People are ready to help you.  They want to see you grow, they love to see you succeed, so harness this opportunity. Connect with them, collaborate, make lasting friendships, and empower others.


 


What is your motto in life, your guiding principle? 


Set goals, commit to them, be consistent, and attain them. That’s all you need to succeed.


 


What is one random fact about you that few people are aware of? 


I love playing football, travelling, meeting and interacting with new people.


 


Good luck to you in all your endeavors, Japhlet!


 


Readers, you can find Japhlet on Twitter and LinkedIn.


 


 


 

Microsoft Teams apps designed for Microsoft 365 coming in Preview to Outlook and Office.com

Microsoft Teams apps designed for Microsoft 365 coming in Preview to Outlook and Office.com

This article is contributed. See the original author and article here.

At last year’s Ignite 2021 Microsoft announced the Preview of a new Teams SDK that enables developers to create Microsoft Teams apps that, with minor adjustments to the app’s manifest, can also extend Teams personal apps and message extensions to other parts of Microsoft 365, like Office and Outlook. Today, we are making the first group of these Teams apps available in Preview for Outlook and Office.com for users enrolled in the Targeted Release program. We’ve also worked on enhancing some of our own apps, like Power BI, partnered very closely with ISVs like Mural and Zoho to build apps using this SDK and will be adding more. Read on to learn how you, an admin, can get your users ready, and what admin controls are already available.


 


With this enhancement, apps built for Teams not only run everywhere Teams runs, but also in more of the places that users spend their time in Microsoft 365, like Outlook and Office.com. You should note that once your users in Targeted Release start seeing these apps, you will need to know how to manage this experience. Click here to learn more.


 


What does this mean for your organization?


 


With the enhanced Teams apps, your users in Targeted Release that use the apps in Teams will start seeing those apps in Outlook and Office.com.


 


Illustration labeled, “Same delightful experience available everywhere you work.” Displays the Microsoft Office, Microsoft Teams, and Microsoft Outlook icons, and beneath them are screenshots of Power BI in Office, Microsoft Teams, and Outlook.Illustration labeled, “Same delightful experience available everywhere you work.” Displays the Microsoft Office, Microsoft Teams, and Microsoft Outlook icons, and beneath them are screenshots of Power BI in Office, Microsoft Teams, and Outlook.


App Management Tools


 


With the enhanced Teams apps, as an admin, you can now manage the app and user access to the app in a unified manner. Previously, for an app to work in Teams, Outlook, and Office, you needed to manage each app independently. With the enhanced Teams apps, you now need to manage it only once, and enable a single, connected experience for end-users across Teams, Outlook, and Office.com.


 


With the enhanced Teams app, for its use in Outlook and Office.com, there is no change in existing permissions, or the app data access. The enhanced app continues to use the existing permissions granted in Teams.


 


Displays the Teams admin center with the permissions pop-up for Zoho projects app.Displays the Teams admin center with the permissions pop-up for Zoho projects app.


As an admin, you can manage the enhanced Teams apps, in the Teams admin center, using the same admin controls that you use for your Teams apps. As a Teams administrator, you can manage your end-users’ access to the enhanced Teams apps. If you are already using the Teams app that is enhanced to work across Microsoft 365, you can see the experience in Preview for Outlook and in Office.com.


 


Displays the Mural app in the Microsoft Office.com experience.Displays the Mural app in the Microsoft Office.com experience.


After you install, your end-users can start using the Teams app in Office.com and can see the app conveniently available in the app bar in Office.com.


 


Displays the Zoho projects app in the Microsoft Office experience, with a highlight on the Zoho projects app in the left ribbon.Displays the Zoho projects app in the Microsoft Office experience, with a highlight on the Zoho projects app in the left ribbon.


Like in Office.com, your end users will have a similar experience in Outlook, plus message extensions within email and calendar composite experience. The app is conveniently available on the left app bar in Outlook.


 


Displays the Zoho projects app Message Extension in the Microsoft Outlook experience.Displays the Zoho projects app Message Extension in the Microsoft Outlook experience.


For additional guidance on how to manage access to the Teams apps across Microsoft 365, check out this Microsoft Docs article: Manage access to Teams apps across Microsoft 365.


 


In the future, we will bring more admin controls to the Microsoft 365 admin center to manage these experiences across all Microsoft 365 apps.


 


Note: The Preview roll-out of these new capabilities has started for users enrolled in the Microsoft 365 Targeted Release program or who are members of the Office Insiders program and have Outlook for Windows installed from the Beta Channel.


 


Continue the conversation by joining us in the Microsoft 365 Tech Community! Whether you have product questions or just want to stay informed with the latest updates on new releases, tools, and blogs, Microsoft 365 Tech Community is your go-to resource to stay connected!

Migrate SQL Server databases at scale to Azure using PowerShell / CLI

This article is contributed. See the original author and article here.

The Azure SQL Migration extension for Azure Data Studio provides a seamless and robust migration experience to help you migrate your SQL Server databases to Azure. However, if you have multiple databases across multiple SQL Server instances, migrating them together at scale using graphical UI may not be the most efficient method. Today, we are announcing Public Preview of new migration capabilities added to Az.DataMigration module in Azure PowerShell and az datamigration extension in Azure CLI. With these migration capabilities added to Azure PowerShell and Azure CLI, you can automate tasks and activities related to SQL Server database assessments, performance data collection for Azure recommendations and migration of multiple databases (across multiple SQL Server instances) at scale.


 


By automating migration activities, you can save time and efficiently migrate a large number of SQL Server databases to Azure SQL Managed Instance or SQL Server on Azure Virtual Machines. For example, the code snippet below demonstrates a SQL Server database migration to Azure SQL Managed Instance using Azure CLI with three commands.


 


Step 1: Create a new Azure Database Migration service in your Azure subscription.


 


 

az datamigration sql-service create --resource-group "myRG" --sql-migration-service-name "myMigrationService" --location "EastUS2"

 


 


Step 2: Configure and start online database migration from SQL Server on-premises (with backups in Azure Storage) to Azure SQL Managed Instance.


 


 

az datamigration sql-managed-instance create `
--source-location '{"AzureBlob":{"storageAccountResourceId":"/subscriptions/mySubscriptionID/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/dbbackupssqlbits","accountKey":"myAccountKey","blobContainerName":"dbbackups"}}' `
--migration-service "/subscriptions/mySubscriptionID/resourceGroups/myRG/providers/Microsoft.DataMigration/SqlMigrationServices/myMigrationService" `
--scope "/subscriptions/mySubscriptionID/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/mySQLMI" `
--source-database-name "AdventureWorks2008" `
--source-sql-connection authentication="SqlAuthentication" data-source="mySQLServer" password="myPassword" user-name="sqluser" `
--target-db-name "AdventureWorks2008" `
--resource-group myRG `
--managed-instance-name mySQLMI

 


 


Step 3: Perform a migration cutover once all backups are restored to Azure SQL Managed Instance.


 


 

$migOpId = az datamigration sql-managed-instance show --managed-instance-name "mySQLMI" --resource-group "myRG" --target-db-name "AdventureWorks2008" --expand=MigrationStatusDetails --query "properties.migrationOperationId"
az datamigration sql-managed-instance cutover --managed-instance-name "mySQLMI" --resource-group "myRG" --target-db-name "AdventureWorks2008" --migration-operation-id $migOpId

 


 


Sample scripts to run end-to-end SQL Server database migrations to Azure SQL Managed Instance or SQL Server on Azure Virtual Machines are available in the Azure Samples Github repository (aka.ms/sqldatamigration-samples).


 


To learn more, see documentation [Migrate databases at scale using automation]