[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 Query] Custom Functions
let IsValidEmail = (input as text) => let name = Text.BeforeDelimiter(input,"@",{0,RelativePosition.FromEnd}), ext = Text.AfterDelimiter(input,".",{0,RelativePosition.FromEnd}), domain = Text.BetweenDelimiters(input,name&"@","."&ext), return = Text.Length(name) > 0 and Text.Length(domain) > 0 and Text.Length(ext) > 1 and Text.Length(ext) < 6 and name = Text.Select(name, {"a".."z","A".."Z","0".."..
[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..