Gallery
Support Formation DAX
Share
Explore
Fonctions de regroupements

icon picker
GENERATE / ROW

A la place de ADDCOLUMS.
Également possible : ROW(Mesure1, Mesure2)
Calendar =
VAR BaseCalendar =
CALENDAR ( DATE ( 2016, 1, 1 ), DATE ( 2018, 12, 31 ) )
RETURN
GENERATE (
BaseCalendar,
VAR BaseDate = [Date]
VAR YearDate = YEAR ( BaseDate )
VAR MonthNumber = MONTH ( BaseDate )
VAR YearMonthNumber = YearDate * 12 + MonthNumber - 1
RETURN ROW (
"Day", BaseDate,
"Year", YearDate,
"Month Number", MonthNumber,
"Month", FORMAT ( BaseDate, "mmmm" ),
"Year Month Number", YearMonthNumber,
"Year Month", FORMAT ( BaseDate, "mmm yy" )
)
)
Ce qui aurait pour équivalence :
Calendar =
VAR Days = CALENDAR ( DATE ( 2016, 1, 1 ), DATE ( 2018, 12, 31 ) )
RETURN ADDCOLUMNS (
Days,
"Year", YEAR ( [Date] ),
"Month Number", MONTH ( [Date] ),
"Month", FORMAT ( [Date], "mmmm" ),
"Year Month Number", YEAR ( [Date] ) * 12 + MONTH ( [Date] ) - 1,
"Year Month", FORMAT ( [Date], "mmm yy" )
)

Autre exemple () :
DEFINE
MEASURE Product[ListProductNames] =
CONCATENATEX (
VALUES ( 'Product'[Product] ),
Product[Product],
", "
)
EVALUATE
CALCULATETABLE (
ROW ( "Products", [ListProductNames] ),
Product[Color] IN { "Blue", "Green" },
Product[Brand] IN { "Contoso", "Fabrikam" }
)
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.