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]
)
SUMMARIZECOLUMNS (
'Sales Territory'[Category], 'Customer' [Education],
FILTER('Customer', 'Customer'[First Name] = "Alicia"),
"First", FIRSTNOBLANK('Customer'[First Name], "")
)
FIRST_DATE = SUMMARIZECOLUMNS(Report[NM],
FILTER(Report, Report[DATE_TIME] <= (DATE(2022,1,1) + TIME(12,0,0)) && Report[DATE_TIME] >= (DATE(2021,1,1) + TIME(12,0,0)) && Report[EVENT]<>"First"),
"Date", FIRSTNONBLANK(Report[DATE_TIME],""))
- D_TIME ์ด 2021 ์ด์ ๋ฐ์ดํฐ ์ค ๋ง์ง๋ง D_TIME
- ์ด : NM, LAST
ํ
์ด๋ธ = SUMMARIZECOLUMNS(TABLE[NM], FILTER(TABLE, YEAR(TABLE[D_TIME]) < 2021), "LAST", MAX(TABLE[D_TIME]))
docs.microsoft.com/ko-kr/dax/summarizecolumns-function-dax
'Power BI > DAX' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Power BI] DAX - GENERATE (0) | 2022.05.03 |
---|---|
[Power BI] DAX - SUMMARIZE (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 |