Action we have three types of chart controls that are made available for us column chart control a line chart control and a pie chart.
Control under charts there is also power bi tile this allows us to connect to any tile in powerbi or even bring in an entire powerbi report so let's start with the column.
Chart control this control is a composite control that comprises of the column chart a title area and the legend the items property for the column.
Chart is sample data that is provided for us here the label is City so it lists out all the cities in the series it has area density.
And population this is based upon the schema of the table that is being provided to this control I've added a button on select of.
This I will load data in a collection that has Revenue information so if I was to click on this button The Collection now includes all the.
Data let's go to the column chart control for the items property I will use my collection which is called Revenue let's expand the width the labels that.
Are being displayed is the year and then in the series the first option that set is India now if I was to change this to let's say USA this will give the revenue.
Numbers across the years for USA my collection has information for three different countries if I would like to have multiple columns per.
Year I'll go to properties number number of series is one I want this to be three since I have data for three countries and now we can see how it is displaying information for each of those three.
- Instagram Poster Blogger Templates Download In PSD Files Sheri Sk Blogger Templates
- Cool PowerPoint Features to up your Productivity Did you know these
- Trik Rahasia Cara Membuat Bentuk Shape yang Presisi di PowerPoint dan Word
Countries as separate columns USA UK - ID Card Make
India the grid style X only so shows the years if I say all it will show both the X and Y AIS why in this scenario points to theed.Revenue markers by default is on I can turn it off if needed items Gap is the gap between the columns let's say five the colors for the.
Items there is a property called item color set by default it has an array of colors defined I'll change this to an array for USA I'll pick the color blue violet UK.
Alpex C green and for India alpex sky blue so we can see how the item colors are set there is the title label control for the.
Chart the line chart control once again it's a composite control for the items property of the line chart I'll use the same collection number of series I'll set to.
Three head over to to Advanced similar properties the label it's the x-axis is the year and then the series that I'm generating the pie chart once again a composite control we have the items.
Property let's use our same collection now notice here under Advanced we only have two options here the label that's the year and what the series based upon I only have one option.
So it can either be on the country India or UK or USA plus it doesn't show me the revenue amount that's because whatever label you select that's the only label that it.
Displays now this is where we can take advantage of table shaping formulas in canvas power apps so let's look look at our collection again now I want to add an extra column here that shows me the.
Total revenue across all my
Countries to do that I simply need to add a column to this collection so I will use the formula add columns to my collection the name of my column I will.Call it total revenue and this will be India plus UK plus USA now I have total revenue for my pie chart control the.
Label is the year the series would be the total revenue but it still does not show me what's that amount to do that we'll add another.
Column add columns to this entire result set you can give any name to this column I'm calling it label and my expression would be we concatenate the year with a string.
Concatenate this with the total revenue and concatenate this with another string all I've done here now is my table will have an extra column called label that will show the year and then under the.
Brackets it will show the total revenue I've also leveraged the text formula to add some formatting so now we can see that the label column has the year as well as the.
Total revenue for that year the label I will leverage the label property that I just created and the series would be the actual total revenue now if we explore the chart.
Control gives me the information I would like to bring information from a data source here I have a SharePoint list that has employee data.
Data my power app is connected to that list to show the data in that list I'll leverage a modern table control that I can easily connect to my employee data SharePoint list now let's.
Go and add one of the chart controls to show how many users belong to a particular department so I'll go and insert the pie chart items property employee data my.
Goal here is to group the data based upon Department Department in my SharePoint list is a column of type choice if I use the group by formula.
Here to group the data based upon the department column it won't allow me to group by that column purely because Department it's a choice column so what I will do here.
Is first I will use the formula show columns to only get the columns I need department so this will give only the data from the Department.
Column bear in mind none of the table shaping formulas are delegable so we are going to be limited to the delegation limit which can be a maximum of.
2,000 so here I have the Departments now I will go and say add columns Department name Department column which is of type Choice do.
Value so now if you notice it gives me the actual values from that choice column for each of the rows in my SharePoint list now if I need any other column information let's say.
Name when I stated show columns here I will say also go ahead and pick the title column title has the name my goal here is to get the number of users for department so I need to.
Group by Department Group by the department name column comma I can give a name to my group group uncore department so it.
Gives me the main Department names and then group uncore Department includes tabular data all those rows from my data source which pertain to that specific department now all I need is another.
Column that gives me the total number of users that are in this table I'll add another column the column name I'll say number of users and then the formula I will use for this is Count.
Rows of this record dot the group which has the tabular data now you can see we have an extra column number of users label I will use Department name.
And series is number of users now here it's not giving me the exact count for the items property I'll add another column.
Label I will concatenate Department name with number of users now I have this label that shows the name of the department and the number of.
Users so for my pie charts label property I'll simply pick that column it's giving me the number of users in each department let's say when I select an.
Item in the chart it should go and filter my table or my gallery for the stable control the items property is my SharePoint list filter my SharePoint list where Department which.
Is a choice column so department. value is equal to my pie chart control do selected dot Department name currently nothing is selected so it doesn't show anything in the table to.
Show information for all departments I'll put an R condition which would be py chart. selected. Department name is equal to blank and the table is listing all my.
Data now if I pick sales observe how the table is filtering the data to only show the user information for the department sales if I pick marketing it show me the marketing data you can confirm the row.
Count at the bottom as well here is a scenario of an existing power app the home screen has a dashboard that lists out the the number of ideas and the different statuses.