SUMMARIZE
Returns a summary table for the requested totals over a set of groups.
Syntax
SUMMARIZE (<table>, <groupBy_columnName>[, <groupBy_columnName>]…[, <name>, <expression>]…)
Example
SUMMARIZE(ResellerSales_USD
, DateTime[CalendarYear]
, ProductCategory[ProductCategoryName]
, "Sales Amount (USD)", SUM(ResellerSales_USD[SalesAmount_USD])
, "Discount Amount (USD)", SUM(ResellerSales_USD[DiscountAmount])
)
SUMM_TABLE ์ด๋ผ๋ ์์ฝ ํ
์ด๋ธ ๋ง๋ค๊ธฐ
TABLE์์ YEAR, PRODUCT, START, END ๊ทธ๋ฃนํํ๊ณ ๊ฐฏ์์ด CNT๋ฅผ ์ถ๊ฐํ ํ
์ด๋ธ์ SUMMARIZECOLUMNS๋ก ๋ง๋ฌ
-> SUMMARIZECOLUMNS(TABLE[YEAR], TABLE[PRODUCT], TABLE[START], TABLE[END], "CNT", COUNT(TABLE[START])
ํด๋น ํ
์ด๋ธ์์ CNT๊ฐ 1 ์ด์์ธ ํ ๋ค๋ง ์ถ์ถํ๊ณ ์ถ์
SUMM_TABLE = SUMMARIZE(
FILTER(SUMMARIZECOLUMNS(TABLE[YEAR], TABLE[PRODUCT], TABLE[START], TABLE[END], "CNT", COUNT(TABLE[START])), [CNT] > 1),
[Year], [PRODUCT], [START], [END], [CNT]
)
docs.microsoft.com/ko-kr/dax/summarize-function-dax
'Power BI > DAX' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Power BI] DAX - GENERATE (0) | 2022.05.03 |
---|---|
[Power BI] DAX - SUMMARIZECOLUMNS (0) | 2021.02.23 |
[Power BI] DAX - CALCULATE (0) | 2021.02.23 |
[Power BI] DAX - Dynamic Index (0) | 2020.09.01 |
[Power BI] DAX - The GENERATESERIES function (0) | 2019.08.07 |