Hello everyone,
I have been trying to sum a gallery column that contains numbers with this bit :
Sum(Gal_Devis_Equipement_Acquisition_Base.AllItems; PrixTotHTBPU_EAB);;
So far it has been working fine but as I import data from a database, some values can be "Null" or "N/A" (which is intended).
My question is : how to sum everything except the non numeric values ?
I have tried this without success :
Sum(
Filter((Gal_Devis_Equipement_Acquisition_Base.AllItems; PrixTotHTBPU_EAB); IsNumeric(PrixTotHTBPU_EAB));;
)
Thanks in advance !
@Anonymous
In the OnVisible property of the screen, put
ClearCollect(
gdeab,
Gal_Devis_Equipement_Acquisition_Base
);
UpdateIf(
gdead,
PrixTotHTBPU_EAB = "N/A" || PrixTotHTBPU_EAB = "Null",
{PrixTotHTBPU_EAB: 0}
)
Your filter should work correctly now if you use gdead as the data source for the gallery. FYI: I wrote it as a collection in case you did not want to modify the original data source. If that is not a problem you can run the update on the original data source to convert the text items to 0.
Hi @Anonymous
For different values (number and text) this formula must work
Sum(YourDataBase.YourColumn; ThisRecord.YourColumn);;
For example I created list "Example". There is a column "Number And/or Text" with type - single line of text. There I have 7 Items with numbers, empty, "N/A" and "null". On screenshot you see gallery and formula at the top for label:
Sum(Example.'Number And/or Text',ThisRecord.'Number And/or Text')
User | Count |
---|---|
255 | |
106 | |
85 | |
51 | |
43 |