Gallery
Support Formation DAX
Share
Explore
Fonctions de regroupements

icon picker
GROUPBY / CURRENTGROUP

Remplace SUMMARIZECOLUMNS mais n’appliquer pas de CALCULATE.
GROUPBY (
<table>,
<group_by_column>,
<column_name>, <expression> )
)
Avec CURRENTGROUP() :
GROUPBY(
<table>,
<group_by_column>,
<column_name>,
SUMX(
CURRENTGROUP(),
<column>))

Exemple

Au lieu de :
EVALUATE
ADDCOLUMNS (
VALUES ( 'Product Category'[Category] ),
"Max SubCat Avg Price", CALCULATE (
MAXX (
ADDCOLUMNS (
SUMMARIZE (
'Product',
'Product Category'[Category],
'Product Subcategory'[Subcategory]
),
"Average Price", CALCULATE ( AVERAGE ( Product[Unit Price] ) )
),
[Average Price]
)
)
)
On écrira :
EVALUATE
GROUPBY (
GROUPBY (
'Product',
'Product Category'[Category],
'Product Subcategory'[Subcategory],
"Average Price", AVERAGEX ( CURRENTGROUP() , Product[Unit Price] )
),
'Product Category'[Category],
"Max SubCat Avg Price", MAXX ( CURRENTGROUP (), [Average Price] )
)
Ressources (ES) :
Loading…

Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.