Documentation/Calc Functions/AGGREGER

    From The Document Foundation Wiki
    This page is a translated version of the page Documentation/Calc Functions/AGGREGATE and the translation is 5% complete.
    Outdated translations are marked like this.


    Funktionsnavn:

    AGGREGER

    Kategori:

    Matematisk

    Resume:

    Denne funktion returnerer et aggregeret resultat af beregningerne i området. Du kan bruge forskellige AGGREGER-funktioner, der er opregnet herunder. AGGREGER-funktionen sætter dig i stand til at udelade skjulte rækker, fejl, SUBTOTAL og andre AGGREGER-funktionsresultater fra beregningen.

    Unlike many other functions that perform similar calculations, AGGREGER provides options to omit certain unwanted data types from its processing. Options are available to ignore errors, hidden rows, and nested SUBTOTAL and other AGGREGER function results.

    Syntaks:

    AGGREGER(Function; Option; Number1[; Number2[; ... [; Number253]]])

    eller

    AGGREGER(Function; Option; Array; k)

    The first syntax is intended for use with Function values 1 to 13, while the second syntax is intended for use with Function values 14 to 19.

    Returnerer:

    Derr returneres altid et reelt tal, hvis betydning afhænger af den anvendte FUNKTION,

    Argumenter:

    Funktion – obligatorisk argument. Et funktionsindeks eller en reference til en celle med en værdi fra 1 til 19 i overensstemmelse med den følgende tabel.

    Funktionsindeks Anvendt funktion
    1 MIDDEL
    2 TÆL
    3 TÆLV
    4 MAKS
    5 MIN
    6 PRODUKT
    7 STDAFVS
    8 STDAFV.P
    9 SUM
    10 VARIANS.S
    11 VARIANS.P
    12 MEDIAN
    13 HYPPIGST.ENKELT
    14 STØRSTE
    15 MINDSTE
    16 FRAKTIL.MEDTAG
    17 KVARTIL.MEDTAG
    18 FRAKTIL.UDELAD
    19 KVARTIL.UDELAD
    Function index Function applied
    1 MIDDEL
    2 TÆL
    3 TÆLV
    4 MAKS
    5 MIN
    6 PRODUKT
    7 STDAFV.S
    8 STDAFV.P
    9 SUM
    10 VARIANS.S
    11 VARIANS.P
    12 MEDIAN
    13 HYPPIGST.ENKELT
    14 STØRSTE
    15 MINDSTE
    16 FRAKTIL.MEDTAG
    17 KVARTIL.MEDTAG
    18 FRAKTIL.UDELAD
    19 KVARTIL.UDELAD

    Indstilling – Obligatorisk argument. Et indstillingsindeks eller reference til en celle med en værdi fra 0 til 7 bestemmer, hvad der skal ignoreres i funktionens område.

    Indstillingsindeks Anvendt indstilling
    0 Ignorer kun indlejrede SUBTOTAL- og AGGREGER-funktioner
    1 Ignorer kun skjulte rækker, indlejrede SUBTOTAL- og AGGREGER-funktioner
    2 Ignorer kun fejl, indlejrede SUBTOTAL- og AGGREGER-funktioner
    3 Ignorer skjulte rækker, fejl, indlejrede SUBTOTAL- og AGGREGER-funktioner
    4 Ignorer ingenting
    5 Ignorer kun skjulte rækker
    6 Ignorer kun fejl
    7 Ignorer kun skjulte rækker og fejl
    Option index Option applied
    0 Ignore only nested SUBTOTAL and AGGREGER functions
    1 Ignore only hidden rows, nested SUBTOTAL and AGGREGER functions
    2 Ignore only errors, nested SUBTOTAL and AGGREGER functions
    3 Ignore hidden rows, errors, nested SUBTOTAL and AGGREGER functions
    4 Ignore nothing
    5 Ignore only hidden rows
    6 Ignore only errors
    7 Ignore only hidden rows and errors

    Tal1 – obligatorisk argument. Det første argument (hvis området er indstillet som en liste over værdier i funktionen) eller en reference til en celle, som indeholder det.

    • A number, or an expression that evaluates to a number.
    • A reference to a single cell containing a number.
    • A simple reference to a cell range containing numbers (for example, A1:B9).
    • The name of a named range, comprising cells containing numbers.
    • The name of a database range, comprising cells containing numbers.
    • An inline array of numbers (for example, {1, 2, 3, 4}).
    • The text of the heading label above a column of numbers, enclosed in single quotation marks - only available if Tools ▸ Options ▸ LibreOffice Calc ▸ Calculate ▸ Automatically find column and row labels option is enabled (LibreOffice ▸ Preferences ▸ LibreOffice Calc ▸ Calculate ▸ Automatically find column and row labels on macOS).

    Matrix – obligatorisk argument. Matrixet kan bestemmes af områdets grænser, det navngivne områdes navn eller kolonneetiketten. For at bruge kolonneetiketter skal funktionen "Find automatisk kolonne- og rækkeetiketter" være aktiveret.

    k – obligatorisk argument for følgende funktioner: STØRSTE, MINDSTE, FRAKTIL.MEDTAG, KVARTIL.MEDTAG, FRAKTIL.UDELAD, KVARTIL.UDELAD. Det er et numerisk argument, som skal svare til det andet argument i disse funktioner.

    • STØRSTE requires a RankC argument (positive integer).
    • MINDSTE requires a RankC argument (positive integer).
    • FRAKTIL.MEDTAG requires an Alpha argument (real number in the range [0, 1]).
    • FRAKTIL.UDELAD requires an Alpha argument (real number in the range (0, 1)).
    • KVARTIL.MEDTAG requires a Type argument (integer in the range [0, 4]).
    • KVARTIL.UDELAD requires a Type argument (integer in the range [1, 3]).

    Hvis noget af parametrene er uden for sit domæne, returnerer funktionen en fejlværdi. Hvis for eksempel indekset Funktion ikke er tilgængeligt, det vil sige ikke inden for [0,19].

    • If either Function or Option is non-numeric, then AGGREGER reports an invalid argument error (Fejl:502).
    • If either Function or Option is not an integer, the value is truncated to its floor value.
    • If Function is less than 1 or greater than 19, then AGGREGER reports an invalid argument error (Fejl:502).
    • If Option is less than 0 or greater than 7, then AGGREGER reports an invalid argument error (Fejl:502).
    • Other errors may be generated depending on the aggregate function selected and the data supplied. For example, a #DIV/0! error is generated if Function is set to 7 (STDAFV.S) and only one data value is supplied. Another example occurs when a #VÆRDI! error is generated if Function is set to 13 (HYPPIGST.ENKELT) and the supplied data contains no duplicate data points. More information about such error conditions can be found on the wiki pages for the standalone versions of the aggregate functions.

    Yderligere oplysninger:

    Warning.svg

    Advarsel:
    Funktionen AGGREGER anvendes på lodrette områder af data med aktiveret Autofilter. Hvis Autofilter ikke er aktiveret, virker den automatiske genberegning af funktionens resultater ikke på nyligt skjulte rækker. Det antages ikke at virke på vandrette områder, men kan imidlertid også anvendes på dem, med begrænsninger. Især genkender AGGREGER-funktionen anvendt på et vandret dataområde ikke skjulte kolonner, men udelader udelader imidlertid korrekt fejl og resultater af SUBTOTAL og andre AGGREGER-funktioner, der er indlejret i rækkerne.

    Eksempler:

    Overvej følgende tabeleksempel til anvendelse af AGGREGER-funktionen:

    A B C
    1 ColumnOne ColumnTwo ColumnThree
    2 34 11 12
    3 10 56 35
    4 #DIV/0! 5 3
    5 20 8 1
    6 0 8 9
    7 #VÆRDI! 20 21
    8 5 7 8
    9 14 0 5
    Formula Description Returns
    =AGGREGER(1; 4; 1; 2; 3; 4; 5; 6) Here the function returns the average value (Function set to 1) of the six supplied numbers (1 to 6, specified in the third to eighth arguments), ignoring nothing (Option set to 4). 3,5
    =AGGREGER(4; 2; A2:A9)

    Here the function returns the maximum value (Function set to 4) across the cell range A2:A9, ignoring hidden rows, and nested SUBTOTAL and AGGREGER functions (Option set to 2).

    This example demonstrates the power of AGGREGER in comparison to the equivalent standalone functions. The formula =MAKS(A2:A9) returns a #DIV/0! error, propagating the error in cell A4. If this error is fixed by some change to cell A4, then the formula =MAKS(A2:A9) returns a #VÆRDI! error, propagating the error in A7. Using AGGREGER avoids some of the data cleansing activity that might otherwise be required.

    || 34
    =AGGREGER(9; 5; A5:C5) Here the function returns the sum (Function set to 9) across the cell range A5:C5, ignoring only hidden rows (Option set to 5). Note that the result remains unchanged as some or all of columns A-C are hidden. 29
    =AGGREGER(9; 5; B2:B9) Here the function returns the sum (Function set to 9) across the cell range B2:B9, ignoring only hidden rows (Option set to 5). Note that the result changes as any of rows 2:9 are hidden - for example, hiding row 7 changes the result to 95. 115
    =AGGREGER(2; 3; Sheet1.B2:Sheet3.B9) It is assumed that the document contains three sheets – with adjacent tabs Sheet1, Sheet2, and Sheet3 in the Sheet tabs area. It is further assumed that all these three tabs contain the same data in cells A1 to C9.

    Here the function returns the count (Function set to 2) across the three dimensional cell range Sheet1.B2:Sheet3.B9, ignoring hidden rows, errors, and nested SUBTOTAL and AGGREGER functions (Option set to 3).
    24
    =AGGREGER(E3; E5; 'ColumnTwo') where cells E3 and E5 contain the numbers 13.3 and 4.7 respectively.

    It is assumed that the option Tools ▸ Options ▸ LibreOffice Calc ▸ Calculate ▸ Automatically find column and row labels is enabled (LibreOffice ▸ Preferences ▸ LibreOffice Calc ▸ Calculate ▸ Automatically find column and row labels on macOS).

    Here the function returns the mode (Function set to truncated value of 13) of the values in ColumnTwo (cells B2:B9), ignoring nothing (Option set to truncated value of 4).

    || 8
    =AGGREGER(15; 4; C2:C9, 3)

    Here the function returns the third (k set to 3) smallest (Function set to 15) of the values in the cell range C2:C9, ignoring nothing (Option set to 4).

    || 5

    Beslægtede LibreOffice-funktioner:

    MIDDEL

    TÆL

    TÆLV

    STØRSTE

    MAKS

    MEDIAN

    MIN

    HYPPIGST.ENKELT

    FRAKTIL.UDELAD

    FRAKTIL.MEDTAG

    PRODUKT

    KVARTIL.UDELAD

    KVARTIL.MEDTAG

    MINDSTE

    STDAFV.P

    STDAFV.S

    SUM

    VARIANS.P

    VARIANS.S

    ODF standard:

    Ingen

    Tilsvarende Excel-funktioner:

    AGGREGATE since v.2010.