Forum Discussion
Anonymous
6 years agoNot applicable
GROUPBY with Count
Hi, I'm new to DAX. In SQL Server I have this query that returns a simple group by: SELECT DISTINCT item_name, count(item_name) AS Item_count FROM [MYDATABASE].[dbo].[MYTABLE] GROUP BY item...
- Anonymous6 years ago
GROUP BY in SQL is usually SUMMARIZE in DAX 🙂
SUMMARIZE('MYTABLE', [item_name], "item_count", COUNTROWS('MYTABLE'))
That will create a table with two columns (item_name and item_count). Use that as <table> in the TOPN function.
Best Regards
Ulf
Anonymous
6 years agoNot applicable
GROUP BY in SQL is usually SUMMARIZE in DAX 🙂
SUMMARIZE('MYTABLE', [item_name], "item_count", COUNTROWS('MYTABLE'))
That will create a table with two columns (item_name and item_count). Use that as <table> in the TOPN function.
Best Regards
Ulf