Forum Discussion
akshay2204
3 years agoFrequent Visitor
Group By and Summarize
Hi, I need solution for the following . I need a distinct count of customers who are relarted to the major group. When We ran a query in Sql we got the expected result. We are facing issue in...
tamerj1
Community Champion
3 years agoHi akshay2204
please try
NewTable =
GROUPBY (
SUMMARIZE (
FILTER ( vwSalesData, vwSalesData[YearID] = 22 && vwSalesData[MonthID] = 4 ),
vwSalesData[CustomerCode],
"MajorGroupCount", DISTINCTCOUNT ( vwSalesData[MajorGroupID] )
),
[MajorGroupCount],
"#ofCustomers", COUNTX ( CURRENTGROUP (), 1 )
)