Forum Discussion
Iamnvt
6 years agoContinued Contributor
Count inside a virtual table
hi, I have a table, and need to summarize for few key columns: ProductCategorySales A AB 1 B AB 2 C AB 3 D BB 33 E BB 4 D BB 1 How can I get the summarize f...
- 6 years ago
Hi Iamnvt ,
Try this code:
Table 2 =VAR _tb = SUMMARIZE('Table','Table'[Category],'Table'[Product])RETURN ADDCOLUMNS(_tb, "Count of Category", COUNTX(FILTER(_tb, 'Table'[Category] = EARLIER('Table'[Category])), 'Table'[Category]))
amitchandak
6 years agoSuper User
Iamnvt , try a measure like this, you can use this in summarize or summarizecolumns
Measure = calculate(count(Table[Category]),allexcept(Table[Category]))