cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Amount of the same Status per Person

Hello!!

I have a SP list of products with few columns that are updated regularly through the app. In the columns, there is one of the type "person" with the name of the seller and another one of the type "Status" with the status of the product (if it was sold, in stock or not in used). I would like to create a table or gallery to see the quantity of products in each of the statuses for each seller. I tried to create filters and use the Count function but I can't. I would like the App to show the same thing as the attached image.

Could someone please give me a step by step to follow?

Please help a beginner!

exemp.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi@santpaivaa,

Do you want to create another table as your screenshot to display the quantity of the products which is classified into different status?

Could you please tell me that:

  1. how you configure your SP list?
  2. what is the Status column type, is it  a Choice?

I have a test on my side, please check as below.

In my scenario, I have a SP list containing a Person column named 'Stuff' and a Choice column named 'Status'.

004.png

 

Let me make it easy for you:

1/ Create a collection to convert all the complex column into text strings as below:

Collect(NewCol,ShowColumns(AddColumns('Work Requests',"status",Status.Value,"name",Staff.DisplayName),"status","name"))

2/ Create another collection to built a new table as you expect as below: 

Collect(
    Hope,
    ShowColumns(
        AddColumns(
            GroupBy(
                NewCol,
                "name",
                "combine"
            ),
            "sold",
            CountIf(
                combine,
                status = "Sold"
            ),
            "stock",
            CountIf(
                combine,
                status = "Stock"
            ),
            "not use",
            CountIf(
                combine,
                status = "Not use"
            )
        ),
        "name",
        "sold",
        "stock",
        "not use"
    )
)

005.png

Hope it could help.

Regards,

Qi

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi@santpaivaa,

Do you want to create another table as your screenshot to display the quantity of the products which is classified into different status?

Could you please tell me that:

  1. how you configure your SP list?
  2. what is the Status column type, is it  a Choice?

I have a test on my side, please check as below.

In my scenario, I have a SP list containing a Person column named 'Stuff' and a Choice column named 'Status'.

004.png

 

Let me make it easy for you:

1/ Create a collection to convert all the complex column into text strings as below:

Collect(NewCol,ShowColumns(AddColumns('Work Requests',"status",Status.Value,"name",Staff.DisplayName),"status","name"))

2/ Create another collection to built a new table as you expect as below: 

Collect(
    Hope,
    ShowColumns(
        AddColumns(
            GroupBy(
                NewCol,
                "name",
                "combine"
            ),
            "sold",
            CountIf(
                combine,
                status = "Sold"
            ),
            "stock",
            CountIf(
                combine,
                status = "Stock"
            ),
            "not use",
            CountIf(
                combine,
                status = "Not use"
            )
        ),
        "name",
        "sold",
        "stock",
        "not use"
    )
)

005.png

Hope it could help.

Regards,

Qi

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (99,275)