[Power BI] DAX - GENERATE
Dates = VAR BaseCalendar = CALENDARAUTO(6) RETURN GENERATE ( BaseCalendar, VAR BaseDate = [Date] VAR YearDate = YEAR(BaseDate) VAR MonthNumber = MONTH(BaseDate) RETURN ROW("Day", BaseDate, "Year", YearDate, "Month Number", MonthNumber, "Month", FORMAT(BaseDate, "mmmm"), "Year Month", FORMAT(BaseDate, "mmm yy" )))
[Power BI] DAX - SUMMARIZE
SUMMARIZE Returns a summary table for the requested totals over a set of groups. Syntax SUMMARIZE (, [, ]…[, , ]…) 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, ST..
[Power BI] DAX - SUMMARIZECOLUMNS
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], [PRODU..
[Power BI] DAX - DATATABLE ํจ์๋ก Static table ๋ง๋ค๊ธฐ
SEGMENTS_DATATABLE = DATATABLE ( "PRICE RANGE", STRING, "MIN PRICE", CURRENCY, "MAX PRICE", CURRENCY, { { "LOW", 0, 10 }, { "MEDIUM", 10, 100 }, { "HIGH", 100, 9999999 } } ) https://www.sqlbi.com/articles/create-static-tables-in-dax-using-the-datatable-function/ Create Static Tables in DAX Using the DATATABLE Function - SQLBI You can create static tables in DAX using the DATATABLE function. This..