SAMPLEAXISWITHLOCALMINMAX DAX Function (Table manipulation)

Returns a subset from a table expression that is obtained by binning the primary X-Axis into equal-sized bins and then preserving the local min/max for each bin across different series.

Syntax

SAMPLEAXISWITHLOCALMINMAX ( <Size>, <Table>, <Axis>, <Measure> [, <Measure> [, … ] ], <MinResolution> [, <DynamicSeries> [, <DynamicSeries> [, … ] ] [, <DynamicSeriesSelectionCriteria>] [, <DynamicSeriesSelectionOrder>] [, <MaxResolution>] [, <MaxDynamicSeries>] [, <MaxIterations>] )
Parameter Attributes Description
Size

A positive integer specifying the number of rows the function should attempt to return. It is not guaranteed to return this number of records since the source table could have fewer rows, or the resolution of iterations parameters could be set such that the desired number of rows cannot be achieved.

Table

A table expression that represents the input to the function. The function will return a table with the same columns (including lineage) as the input.

Axis

The (numeric or date) column that should be binned. Each bin will preserve rows that contain min/max measure value per series. This is the column that will be sampled to find an evenly distributed set of values according to the DesiredRowsCount and Resolution parameters.

Measure Repeatable

The (numeric or date) column(s) that will be sampled to find a representative set of values from Axis that include local minimum or maximum values of the Measure columns.

MinResolution

For any series, the minimum number of selected rows across the global Axis range.

DynamicSeries Optional
Repeatable

The column(s) from the specified table that plays the role of a series.

DynamicSeriesSelectionCriteria Optional

Can be NONE or ALPHABETICAL.

DynamicSeriesSelectionOrder Optional

The order to be applied. 0/FALSE/DESC – descending; 1/TRUE/ASC – ascending.

MaxResolution Optional

For any series, the maximum number of selected rows across the global Axis range.

MaxDynamicSeries Optional

The maximum number of distinct dynamic series allowed.

MaxIterations Optional

Number of iterations with different bin-sizes to try in order to satisfy the desired number of requested rows.

Return values

Table An entire table or a table with one or more columns.

A subset from a table expression that preserves the local min/max for each bin across different series.

Remarks

SAMPLEAXISWITHLOCALMINMAX is used by Power BI to reduce the number of points in a line chart with a continuous (numeric) x-axis.

Last update: Mar 13, 2024   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Daniel Otykier

Microsoft documentation not available.
The function may be undocumented or unsupported. Check the Compatibility box on this page.

2018-2024 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of SAMPLEAXISWITHLOCALMINMAX? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.