cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Condition information of a label based on dropdown selecction

Hi,

 

I want to condition a label to show information based on the dropdown selection that I have, but it has a trick.

If the dropbox is empty I need to show me the sum of all the items that I have in the Gallery, but if the dropbox is selected the label information only have to show the sum of the filtred information.

 

The formula that I have is this one:

If((Sum('Visitas para ventas';'Visitas realizadas')/Sum('Visitas para ventas';'Visitas programadas'))>=0.95;"Cumpliendo";If((Sum('Visitas para ventas';'Visitas realizadas')/Sum('Visitas para ventas';'Visitas programadas'))>=0.9;"A mejorar";If((Sum('Visitas para ventas';'Visitas realizadas')/Sum('Visitas para ventas';'Visitas programadas'))<0.9;"Incumpliendo")))

 

This works but only to sum all the items, I´m struggling to add a condition for a sum of the selected option in the dropdown.

The data is conected by a sharepoint list.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Condition information of a label based on dropdown selecction

Hi @jeguizabal ,

What @Jeff_Thorpe  means is that using Gallery.AllItems to represent the tablename.

Since no matter what the drop down selects, Gallery.AllItems could represent the table that you want to sum.

So please try this:

1)Set the gallery's Items:

If(IsEmpty(drop down.Selected),'Visitas para ventas';
Filter('Visitas para ventas';fieldname=drop down.Selected.value)

2)the sum result:

If((Sum(Gallery1.AllItems;'Visitas realizadas')/Sum(Gallery1.AllItems;'Visitas programadas'))>=0.95;"Cumpliendo";
(Sum(Gallery1.AllItems;'Visitas realizadas')/Sum(Gallery1.AllItems;'Visitas programadas'))>=0.9;"A mejorar";
(Sum(Gallery1.AllItems;'Visitas realizadas')/Sum(Gallery1.AllItems;'Visitas programadas'))<0.9;"Incumpliendo"
)

 

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

4 REPLIES 4
Highlighted
Super User
Super User

Re: Condition information of a label based on dropdown selecction

If the label is the sum of what is in the gallery couldn't you based the formula on the gallery results instead of applying the same filters to the Sum().

 

Example: Sum(Gallery.AllItems, 'FieldToSum')



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Condition information of a label based on dropdown selecction

Hi,

 

I´m sorry is not onlie the sum, it has to sum the values of two columns of a sharepoint list and divide the totals, so the resultof the label is compare to a goal and display "Cumpliment";"To improve";"Inconpleate"

Highlighted
Community Support
Community Support

Re: Condition information of a label based on dropdown selecction

Hi @jeguizabal ,

What @Jeff_Thorpe  means is that using Gallery.AllItems to represent the tablename.

Since no matter what the drop down selects, Gallery.AllItems could represent the table that you want to sum.

So please try this:

1)Set the gallery's Items:

If(IsEmpty(drop down.Selected),'Visitas para ventas';
Filter('Visitas para ventas';fieldname=drop down.Selected.value)

2)the sum result:

If((Sum(Gallery1.AllItems;'Visitas realizadas')/Sum(Gallery1.AllItems;'Visitas programadas'))>=0.95;"Cumpliendo";
(Sum(Gallery1.AllItems;'Visitas realizadas')/Sum(Gallery1.AllItems;'Visitas programadas'))>=0.9;"A mejorar";
(Sum(Gallery1.AllItems;'Visitas realizadas')/Sum(Gallery1.AllItems;'Visitas programadas'))<0.9;"Incumpliendo"
)

 

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

Frequent Visitor

Re: Condition information of a label based on dropdown selecction

Thanks that really works.


@v-yutliu-msft wrote:

Hi @jeguizabal ,

What @Jeff_Thorpe  means is that using Gallery.AllItems to represent the tablename.

Since no matter what the drop down selects, Gallery.AllItems could represent the table that you want to sum.

So please try this:

1)Set the gallery's Items:

If(IsEmpty(drop down.Selected),'Visitas para ventas';
Filter('Visitas para ventas';fieldname=drop down.Selected.value)

2)the sum result:

If((Sum(Gallery1.AllItems;'Visitas realizadas')/Sum(Gallery1.AllItems;'Visitas programadas'))>=0.95;"Cumpliendo";
(Sum(Gallery1.AllItems;'Visitas realizadas')/Sum(Gallery1.AllItems;'Visitas programadas'))>=0.9;"A mejorar";
(Sum(Gallery1.AllItems;'Visitas realizadas')/Sum(Gallery1.AllItems;'Visitas programadas'))<0.9;"Incumpliendo"
)

 

Best regards,


 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (3,556)