Skip to content

Commit 42b5a43

Browse files
authored
Update Powerbi_interview_2.md
1 parent ddcb2e9 commit 42b5a43

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

03. Interview Questions/Powerbi_interview_2.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@
1010
"Total Amount",sum(Sales[Sales Amount])
1111
)
1212
```
13+
- SUMMARIZECOLUMNS:
14+
- Create a summary table for the requested totals over set of groups
15+
- Syntax: ```SUMMARIZECOLUMNS ( [<GroupBy_ColumnName> [, [<FilterTable>] [, [<Name>] [, [<Expression>] [, <GroupBy_ColumnName> [, [<FilterTable>] [, [<Name>] [, [<Expression>] [, … ] ] ] ] ] ] ] ] ] )```
16+
- Example:
17+
``` dax
18+
-- SUMMARIZECOLUMNS is the primary querying function in DAX
19+
-- It provides most querying features in a single function:
20+
-- First set of arguments are the groupby columns
21+
-- Second set are the filters
22+
-- Third set are additional columns added to the resultset
23+
EVALUATE
24+
SUMMARIZECOLUMNS (
25+
'Product'[Brand],
26+
'Date'[Calendar Year],
27+
TREATAS ( { "CY 2008", "CY 2009" }, 'Date'[Calendar Year] ),
28+
TREATAS ( { "Red", "Blue" }, 'Product'[Color] ),
29+
"Amount", [Sales Amount],
30+
"Qty", SUM ( Sales[Quantity] )
31+
)
32+
```
1333
1434
1535
2.

0 commit comments

Comments
 (0)