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
Solved! Go to Solution.
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,
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')
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"
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,
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,
User | Count |
---|---|
140 | |
136 | |
78 | |
74 | |
73 |
User | Count |
---|---|
231 | |
176 | |
68 | |
68 | |
61 |