cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AdamH
Post Partisan
Post Partisan

Dashboard Style Reporting

I'd like to get my head around some basic reporting within the PowerApp I'm building.

 

The App itself is a staff database around staff development.

 

I have some fields within the PowerApp that I would like to have a Dashboard style page report on.

 

The first two being:

Each staff record has an 'Active' drop down field that has Yes / No option. My first two would be How many Active Staff do we have & How many Inactive staff do we have and report back a figure like the picture below.

dashboard1.png

When a user selects; for example, 'Total Active Staff', I want this to navigate to a new window & gallery to show those results. 

 

Thanks 🙂

 

oh and a shout out to @WarrenBelz for taking the time out of his evening and helping me solve a problem that was sending me to an early grave!  

2 ACCEPTED SOLUTIONS

Accepted Solutions

@AdamH 

So in general, this is all about data shaping. 

You've not provided a lot of detail on the data that you have, so I will assume a few things.

 

For your Gallery, you would have something along these lines for the Items property:

Table(
    {Title: "Total Active Staff",
     Items: Filter(yourData, Active.Value = "Yes")
    },
    {Title: "Total Inactive Staff",
     Items: Filter(yourData, Active.Value = "No")
    },
    {Title: "NQP 12 Month Review",
     Items: Filter(yourData, criteriaFor12MonthReview)
    },
    ...etc..
)

In the Gallery, a Label for the Title  ThisItem.Title

A label for the Count:  CountRows(ThisItem.Items)

 

Now, in the OnSelect of the Gallery, navigate to the screen you want to show the List of associated items.

In that screen...a Gallery with an Items property of yourDashboardGallery.Selected.Items

 

That will show only those that meet the criteria.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

@AdamH 

So, let's discuss that a bit.  

The Table of records for your Dashboard gallery is not related to any particular record or dataset. It is very custom.  It DOES have the filtered list of records that match that criteria.

 

Since you have this information, you can do this...

In the OnSelect of your Gallery set a global variable.  We need to do this because you will likely edit a record down the road and your datasource will change.  This will cause the Gallery to reevaluate its items property and thus the selected item in the Gallery will change.  So, setting a snapshot of the current record will be helpful.

So, OnSelect:  Set(glbCurrentRecord, ThisItem); Navigate(yourBrowseScreen)

 

On that screen, you will have a Gallery (let's call it Gallery2).  The Items property of the Gallery will be set to : glbCurrentRecord.Items

As a bonus, you can put a Label on the screen as well and set its text property to : glbCurrentRecord.Title

 

In that Gallery, you can set the OnSelect to: Navigate(yourEditFormScreen)

 

On that screen you have an EditForm with a Datasource of your current datasource and an Item property of: Gallery2.Selected

 

In the OnSuccess of the EditForm:  Back()

 

This should give you what you are looking for.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

18 REPLIES 18

@AdamH 

So in general, this is all about data shaping. 

You've not provided a lot of detail on the data that you have, so I will assume a few things.

 

For your Gallery, you would have something along these lines for the Items property:

Table(
    {Title: "Total Active Staff",
     Items: Filter(yourData, Active.Value = "Yes")
    },
    {Title: "Total Inactive Staff",
     Items: Filter(yourData, Active.Value = "No")
    },
    {Title: "NQP 12 Month Review",
     Items: Filter(yourData, criteriaFor12MonthReview)
    },
    ...etc..
)

In the Gallery, a Label for the Title  ThisItem.Title

A label for the Count:  CountRows(ThisItem.Items)

 

Now, in the OnSelect of the Gallery, navigate to the screen you want to show the List of associated items.

In that screen...a Gallery with an Items property of yourDashboardGallery.Selected.Items

 

That will show only those that meet the criteria.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

I only wanted to tackle a few items at a time to save it all getting complicated and any misunderstanding.

 

dashboard1.png

The above image is made from Labels only, I have not inserted a gallery here - Maybe this is not the best way of going around this type of thing?

 

Please correct me if I'm wrong, I wanted the larger numbers to report the totals based on the set query but the 'OnSelect' navigate to a gallery showing that query in a gallery view. 

 

 

 

 

@AdamH 

No, the Gallery is Perfect!  You don't want to do this in a control by control way as you will then have a ton of controls to fiddle with forever.  Use a Gallery, do the labels and etc. the way you want and all the rest is done.

 

In this case, I would say if you want that look, use a Gallery with a WrapCount set to 4.

Use the Items property like I showed.

That will give you exactly what you are looking for.  Set the label sizes, fonts, colors, etc as you like.

Beside the OnSelect of the Gallery to navigate to another screen, there is nothing else you need than what was provided.

 

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

OK - I have changed that and it's all working well. 

 

Now because I'm calling the same records up as in my original Gallery from when creating this app, the 'Right Arrow' that would normally take you to the Record Details screen 'Select(Parent)' is not working on these new galleries. 

 

On my original galleries the right arrow opens the DetailsScreen1 and DetailForm1

@AdamH 

So, let's discuss that a bit.  

The Table of records for your Dashboard gallery is not related to any particular record or dataset. It is very custom.  It DOES have the filtered list of records that match that criteria.

 

Since you have this information, you can do this...

In the OnSelect of your Gallery set a global variable.  We need to do this because you will likely edit a record down the road and your datasource will change.  This will cause the Gallery to reevaluate its items property and thus the selected item in the Gallery will change.  So, setting a snapshot of the current record will be helpful.

So, OnSelect:  Set(glbCurrentRecord, ThisItem); Navigate(yourBrowseScreen)

 

On that screen, you will have a Gallery (let's call it Gallery2).  The Items property of the Gallery will be set to : glbCurrentRecord.Items

As a bonus, you can put a Label on the screen as well and set its text property to : glbCurrentRecord.Title

 

In that Gallery, you can set the OnSelect to: Navigate(yourEditFormScreen)

 

On that screen you have an EditForm with a Datasource of your current datasource and an Item property of: Gallery2.Selected

 

In the OnSuccess of the EditForm:  Back()

 

This should give you what you are looking for.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!


@RandyHayes 

 

Ok this has confused me - to many galleries to think about.

 

My current setup is:

 

Dashboard Screen

This has two galleries on it. One gallery (Gallery5) with WrapCount2 and another (Gallery5_1) with WrapCount4.

The right (selection) arrows on these are set to navigate to Dashboard Report1 Screen or Dashboard Report2 Screen. 

dashboard1.png

 

 

Dashboard Report 1 

Has a gallery called 'Gallery2' which has the typical vertical gallery on it which displays the filtered results from the Dashboard Screen (Gallery5)

 

Dashboard Report 2

Has a gallery called 'Gallery2_1' which has the typical vertical gallery on it which displays the filtered results from the Dashboard Screen (Gallery5_1)

My original Browse, Detail and Edit Screens which are connected to my Data Source
BrowseScreen1 has 'Gallery1'

DetailScreen1 has 'DetailForm1'

EditScreen1 has 'EditForm1'

 


Since you have this information, you can do this...

In the OnSelect of your Gallery set a global variable.  We need to do this because you will likely edit a record down the road and your datasource will change.  This will cause the Gallery to reevaluate its items property and thus the selected item in the Gallery will change.  So, setting a snapshot of the current record will be helpful.

So, OnSelect:  Set(glbCurrentRecord, ThisItem); Navigate(yourBrowseScreen)


 

 


On that screen, you will have a Gallery (let's call it Gallery2).  The Items property of the Gallery will be set to : glbCurrentRecord.Items

As a bonus, you can put a Label on the screen as well and set its text property to : glbCurrentRecord.Title

This is where I am getting confused -

 

Set(glbCurrentRecord.........) needs to be set on the Dashboard Screen galleries 5 and 5_1  and then navigate to Dashboard Report or my original BrowseScreen1??

 

Then :glbCurrentRec....... needs to be set on the Dashboard report screens Gallery 2 and 2_1 ??

@AdamH 

I'm not sure the confusion.  What I suggested was two galleries 1) the dashboard and 2) the list of items for the selected dashboard item.  Yours now has 5 galleries??

 

Let me walk through it again.

 

1) Your main screen has One Vertical Gallery with a wrap count of 4.  

   The Items property is:

Table(
    {Title: "Total Active Staff",
     Items: Filter(yourData, Active.Value = "Yes")
    },
    {Title: "Total Inactive Staff",
     Items: Filter(yourData, Active.Value = "No")
    },
    {Title: "NQP 12 Month Review",
     Items: Filter(yourData, criteriaFor12MonthReview)
    },
    {Title: "NQP 18 Month Review",
     Items: Filter(yourData, criteriaFor12MonthReview)
    },
    {Title: "NQP 14 Month Review",
     Items: Filter(yourData, criteriaFor12MonthReview)
    },
    {Title: "Staff without Mentor/Preceptor",
     Items: Filter(yourData, criteriaFor12MonthReview)
    },
    {Title: "BLANK",
     Items: Filter(yourData, criteriaFor12MonthReview)
    },
    {Title: "BLANK",
     Items: Filter(yourData, criteriaFor12MonthReview)
    },

)

In that Gallery you have two Labels.  One that has the Text property set to ThisItem.Title and the other that is set to CountRows(ThisItem.Items)

To get the look you have, I would set the Title Label to a large Height and set the Fill property to the light grey color you have.  Also set the VerticalAlign to Top and the Align to Center.  Adjust font sizes and such as you wish.

 

I see no arrow as you say, and it is not really needed.  Just set the OnSelect property of your Gallery to : Set(glbCurrentRecord, ThisItem); Navigate('Dashboard Report 1')

 

2) On the Dashboard Report 1 screen - a Gallery (Gallery2) that has its Items property set to: glbCurrentReport.Items

  

3) The OnSelect property of your Gallery2, Navigate(DetailScreen)  or EditScreen depending on what you want to happen when someone clicks on an item in that list.

 

4) The Item property of all of your forms should be set to Gallery2.Selected

 

That's it.  You don't need multiple Report screens or two galleries on the main screen.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

Made adjustments as your recommendation, Unfortunately PowerApps is not happy with something:

2021-03-19 11_12_22-Window.png

 This image is from Dashboard Screen - OnSelect property 

 

2021-03-19 11_13_36-Window.png

 This image is from Dashboard Report Screen - Items property 

I did mention that these screens are an addition to an existing app which already has Browse, Detail and Edit screens, if I change my Detail and Edit forms to work from Gallery2.Selected, the original screens will fail to function. Maybe this will help you see where I am coming from?
2021-03-19 11_25_19-Window.png

 

So the idea of the Dashboard is to break the data down (filter) and then I want to be able to edit that if needed, but I wanted to be able to use the original Detail and Edit screens. 

 

@AdamH 

Something is not right on your first formula.  Where are you putting this formula?  It should be on the OnSelect action of the Dashboard Gallery.  I am noticing the formula editor is stating a datatype of Boolean...that is not normal for an OnSelect.

 

What error are you getting on the other forms?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!   This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08  23 @WarrenBelz  31 @DBO_DV  10 @Amik  19 AmínAA 6 @mmbr1606  12 @rzuber  4 @happyume  7 @Giraldoj  3@ANB 6 (tie)   @SpongYe  6 (tie)     Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08  10@WarrenBelz 25 @DBO_DV  6@mmbr1606 14 @AmínAA 4 @Amik  12 @royg  3 @ANB  10 @AllanDeCastro  2 @SunilPashikanti  5 @Michaelfp  2 @FLMike  5 @eduardo_izzo  2   Meekou 2   @rzuber  2   @Velegandla  2     @PowerPlatform-P  2   @Micaiah  2     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27     Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8   SunilPashikanti8

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (405)