hvis altså Andel er en string datatype med procent tegn i.. du siger jo ikke så meget om datatype.. hvis det er tal af en art så kan du bruge sum direkte.
Jeg ved ikke om der er andre metoder, men jeg ville oprette en ekstra forespørgsel, hvor du summerer på totalen, og så joiner de to forespørgsler i en tredie hvor du kan beregne andelen
can we see the sql to the query you use currently? Looking at your example you are selecting individual records and if that is the case I would mak a sub select which selects the sum and once you have this you can calculated the %
Example: SELECT tbl1.UgeNr, tbl1.Data, (SELECT Sum(Data) FROM tbl1) AS Total, [Data]/([Total]/100) AS Pct FROM tbl1;
Or you can do it all in one calculate field
SELECT tbl1.UgeNr, tbl1.Data, [Data]/ ((SELECT Sum(Data) FROM tbl1)/100) FROM tbl1;
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.