StdevP Function in PowerFx Using Canvas App with Power Apps

Power Apps is a suite of apps, services, connectors, and data platforms that provide a rapid application development environment to build custom apps for your business needs. More Details https://docs.microsoft.com/en-us/powerapps/powerapps-overview.

Power Fx is the low-code language that will be used across the Microsoft Power Platform. It's a general-purpose, strong-typed, declarative, and functional programming language.

The StdevP function calculates the standard deviation of its arguments.The General syntax is StdevP ( NumericalFormula1, [ NumericalFormula2, ... ] )

Reading this article, you can learn how to perform the StdevP function from Power Fx using Microsoft Power Apps. Also, you will be able to learn Text box and label control in the Power Apps environment.

Step 1. Open the URL https://powerapps.microsoft.com/en-us/ in the browser for Power apps.

Create an account with your Organisation Mail ID and log in after logging into your Power Apps account.

Step 2. First, Click Create (+ ) and Select the Canvas app from blank.

Canvas app

Blank app

Create

Next, give the app name as PADPFStd and format it as Tablet.

 PADPFStd

Screens

Step 3. To test the power function, first rename the screen as SCRPAPF.

First rename

Next, Insert a Label control and set the Name and Text property as LblTitle and “StdevP function in PowerFx using canvas App with Power apps”.

Label control

Next, Insert a Label control and set the Name and Text property as LblScore1 and “Test Score1"

Text property

Next, Insert a TextBox control and set the Name and Format property as TxtScore1 and Number.

TextBox

Next, Insert a Label control and set the Name and Text property as LblScore2 and “Test Score2".

Test Score2

Next, Insert a TextBox control and set the Name and Format property as TxtScore2 and Number.

TextBox control

Next, Insert a Label control and set the Name and Text property as LblScore3 and “Test Score3"

Test Score3

Next, Insert a TextBox control and set the Name and Format property as TxtScore3 and Number.

TxtScore3

Next, Insert a Label control and set the Name and Text property as LblScore4 and “Test Score4"

Test Score4

Next, Insert a TextBox control and set the Name and Format property as TxtScore4 and Number.

Format property

Insert Button control and set the Name property as Calculate and Onselect property as UpdateContext({Lap:(TxtScore1)});UpdateContext({Prin:(TxtScore2)});UpdateContext({Mou:(TxtScore3)});UpdateContext({Mou:(TxtScore4)});

Button control

Insert Label control and set the Name property as LblRes and Text property as "The Standard Deviation of Test score is "&StdevP(TxtScore1.Text,TxtScore2.Text,TxtScore3.Text,TxtScore4.Text)) for displaying Results.

Standard Deviation

Finally, the form design looks like this.

Design looks

Step 4. Now we can see the preview of your App in Power Apps Studio, and The output of the PADPFStd is,

After Entering the Scores, The Browser Displays is,

 Browser Displays

The Apple iPhone Display is,

Apple iPhone Display

The Tablet Display is,

 Tablet Display

Now, you have successfully tested the Power Fx – StdevP function in the Power Apps Studio environment.


Similar Articles