cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jeguizabal
Level: Powered On

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
Community Support Team
Community Support Team

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
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.
jeguizabal
Level: Powered On

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"

Community Support Team
Community Support Team

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

jeguizabal
Level: Powered On

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Kudoed Authors
Users Online
Currently online: 4 members 5,584 guests
Recent signins:
Please welcome our newest community members: