๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ


Power BI/DAX

(9)
[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 - CALCULATE Sales ํ…Œ์ด๋ธ” ์ธก์ •๊ฐ’ : ํŒŒ๋ž€์ƒ‰์œผ๋กœ ๋œ ์ œํ’ˆ๋งŒ Sales Amount ํ•ฉ๊ณ„ ๊ณ„์‚ฐ Blue Revenue = CALCULATE( SUM(Sales[Sales Amount]), 'Product'[Color] = "Blue" ) PreC = var CurrentIndex = 'Table'[์ธ๋ฑ์Šค] var CurrentName = 'Table'[Name] return CALCULATE(SUM('Table'[C]),FILTER(ALL('Table'),'Table'[์ธ๋ฑ์Šค]= CurrentIndex - 1), 'Table'[Name] = CurrentName ) docs.microsoft.com/ko-kr/dax/calculate-function-dax CALCULATE ํ•จ์ˆ˜(DAX) - DAX ๋‹ค์Œ์— ๋Œ€ํ•ด ์ž..
[Power BI] DAX - Dynamic Index No. = CALCULATE ( COUNT ( 'Data'[์ธ๋ฑ์Šค] ), FILTER (ALLSELECTED ('Data'), 'Data'[์ธ๋ฑ์Šค]
[Power BI] DAX - The GENERATESERIES function https://www.sqlbi.com/articles/generating-a-series-of-numbers-in-dax/ Generating a series of numbers in DAX - SQLBI This article describes how to create a table with a series of numbers in DAX by using the new GENERATESERIES function or through a workaround using CALENDAR www.sqlbi.com
[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..
[Power BI] DAX - SUMMARIZE + UNION ํ…Œ์ด๋ธ” ๊ฒฐํ•ฉ Table F = UNION ( SUMMARIZE ( TableA, TableA[a6], TableA[a8x], "hits", COUNT ( TableA[a5] ) ), SUMMARIZE ( TableB, TableB[b2], TableB[b1], TableB[b3x] ) ) https://community.powerbi.com/t5/Desktop/Union-column-order/td-p/216101 Union column order I'm trying to use the UNION function with two summarized tables and a third table. The first two tables are summarized in the exact same way, and their ..