# Allmänna numeriska funktioner

I dessa allmänna numeriska funktioner är argumenten uttryck där x ska tolkas som ett reellt tal. Alla funktioner kan användas både i dataladdningsskript och diagramuttryck.

Använd listrutan för varje funktion för att visa en kort beskrivning samt syntaxen för funktionen. Klicka på funktionens namn i syntaxbeskrivningen för fler detaljer.

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### bitcount

BitCount() returnerar hur många bitar i den binära motsvarigheten till ett decimaltal som är inställda på 1. Denna funktion returnerar alltså antalet inställda bitar i integer\_number, där integer\_number tolkas som ett signerat 32-bitars heltal.

[**bitcount**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/bitcount.htm)(integer\_number)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### div

Div() returnerar heltalsdelen av den aritmetiska divisionen av det första argumentet med det andra argumentet. Båda parametrarna tolkas som reella tal, de behöver alltså inte nödvändigtvis vara heltal.

[**div**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/div.htm)(integer\_number1, integer\_number2)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### fabs

Fabs() returnerar absolutvärdet för x. Resultatet blir ett positivt tal.

[**fabs**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/fabs.htm)(x)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### fact

Fact() returnerar faktorn av ett positivt heltal x.

[**fact**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/fact.htm)(x)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### frac

Frac() returnerar decimaldelen av x.

[**frac**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/frac.htm)(x)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### sign

Sign() returnerar 1, 0 eller -1 beroende på om x är ett positivt tal, 0 eller ett negativt tal.

[**sign**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/sign.htm)(x)

## Kombinations- och permutationsfunktioner

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### combin

Combin() returnerar antalet kombinationer av q-element som kan väljas från en uppsättning p-element. Motsvaras av formeln: `Combin(p,q) = p! / q!(p-q)!` Ordningen som komponenterna väljs i är inte signifikant.

[**combin**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/combin.htm)(p, q)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### permut

Permut() returnerar antalet permutationer av q element som kan väljas från en uppsättning med p element. Motsvaras av formeln: `Permut(p,q) = (p)! / (p - q)!` Ordningen som komponenterna väljs i är signifikant.

[**permut**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/permut.htm)(p, q)

## Modulofunktioner

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### fmod

fmod() är en generaliserad modulofunktion som returnerar den återstående delen av heltalsdivisionen av det första argumentet (dividenden) med det andra argumentet (divisorn). Resultatet blir ett reellt tal. Båda argumenten tolkas som reella tal, de behöver alltså inte nödvändigtvis vara heltal.

[**fmod**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/fmod.htm)(a, b)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### mod

Mod() är en matematisk modulofunktion som returnerar den icke-negativa återstoden av en heltalsdivison. Det första argumentet är dividenden, det andra argumentet är divisorn. Båda argumenten måste vara heltalsvärden.

[**mod**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/mod.htm)(integer\_number1, integer\_number2)

## Paritetsfunktioner

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### even

Even() returnerar True (-1) om integer\_number är ett jämnt heltal eller noll. Den returnerar False (0) om integer\_number är ett udda heltal och NULL om integer\_number inte är ett heltal.

[**even**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/even.htm)(integer\_number)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### odd

Odd() returnerar True (-1) om integer\_number är ett udda heltal eller noll. Det returnerar False (0) om integer\_number är ett jämnt heltal och NULL om integer\_number inte är ett heltal.

[**odd**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/odd.htm)(integer\_number)

## Avrundningsfunktioner

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### ceil

Ceil() rundar av ett tal uppåt till närmaste multipel av det step som förskjuts av offset -talet.

[**ceil**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/ceil.htm)(x[, step[, offset]])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### floor

Floor() rundar av ett tal nedåt till närmaste multipel av det step som förskjuts av offset -talet.

[**floor**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/floor.htm)(x[, step[, offset]])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### round

Round() returnerar resultatet av avrundning av ett tal uppåt eller nedåt till närmaste multipel av step som förskjuts av offset -talet.

[**round**](https://help.qlik.com/sv-SE/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/round.htm)( x [ , steg [ , förskjutning ]])