cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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 II
Super User II

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

Highlighted
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,157)