cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Robertjde
Helper V
Helper V

Ideas for creating a ranking

I have an incident report application.
The data or the entries all go to an SP list.

 

I would now like to build a ranking in the application from my SP list and have no idea how I can implement it.

 

What i need is:

- What was the most common reason (column AN)

-What was the most common cause (column ART)

 

Here is an example gallery with the contents of my SP List

 

Report_Ranking.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Robertjde ,

So do you mean the sort order is:

1. Flow Wrap - Visual Standard nok;

2. T-Disc - Siegelung nok ;

3. other fields?

 

Since you need the value of two fields, so I suggest you use addcolumn functions to add a column, then sort based on this new column.

Try to set the gallery's Items like this:

Sort(
      AddColumns(
                  Filter('QA vOR...',Datum>=Datepicker2.SelectedDate&&Datum<=Datepicker1.SelectedDate),
                  "sortorder",
                  If(ANfieldname="Flow Wrap"&&ARTfieldname="Visual Standard nok",3,
                     ANfieldname=" T-Disc"&&ARTfieldname="Siegelung nok",2)
                 ),
        sortorder,Descending)

 

//please fill in your list name and fieldname

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yutliu-msft
Community Support
Community Support

Hi @Robertjde ,

Could you describe more clearly about the "ranking" in your app?

Whether do you want to add a column to record the ranking 

                                         or sort based on column AN and column ART?
I assume that you want to sort based on column AN and column ART.

If so, could you tell me your sort  order?

If you want to SortOrder  is SortOrder.Descending or SortOrder.Ascending, things will be easy.

You just need to set the gallery's Items like this:

SortByColumns(tablename,"AN",SortOrder.Ascending,"ART",SortOrder.Descending)

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yutliu-msft 

 

Exactly, I want to sort based on column AN and column ART.

Before that I use a filter by date.

 

unfortunately your proposed solution does not work 100%

 

in this example it should be sorted in the following order ...

All points with....

1. Flow Wrap - Visual Standard nok

2. T-Disc - Siegelung nok 

 

SortOrder.JPG

Hi @Robertjde ,

So do you mean the sort order is:

1. Flow Wrap - Visual Standard nok;

2. T-Disc - Siegelung nok ;

3. other fields?

 

Since you need the value of two fields, so I suggest you use addcolumn functions to add a column, then sort based on this new column.

Try to set the gallery's Items like this:

Sort(
      AddColumns(
                  Filter('QA vOR...',Datum>=Datepicker2.SelectedDate&&Datum<=Datepicker1.SelectedDate),
                  "sortorder",
                  If(ANfieldname="Flow Wrap"&&ARTfieldname="Visual Standard nok",3,
                     ANfieldname=" T-Disc"&&ARTfieldname="Siegelung nok",2)
                 ),
        sortorder,Descending)

 

//please fill in your list name and fieldname

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,513)