cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ramzay Frequent Visitor
Frequent Visitor

Implementing in DAX SQL query with COUNT and GROUP BY

In need to implement in DAX a table definition similar to the result of the following simple SQL query:

SELECT
   Col1,
   Col2,
   Col3,
   COUNT(*)
FROM Tab1
GROUP BY 
  Col1,
  Col2,
  Col3

Thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: Implementing in DAX SQL query with COUNT and GROUP BY

Add new measure with following formula

 

TotalCount = COUNTROWS('your table name')

Now add Table visual and drop you col1, col2, col3 and TotalCount measure on it, it should do it.






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

2 REPLIES 2
Super User IV
Super User IV

Re: Implementing in DAX SQL query with COUNT and GROUP BY

Add new measure with following formula

 

TotalCount = COUNTROWS('your table name')

Now add Table visual and drop you col1, col2, col3 and TotalCount measure on it, it should do it.






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

Highlighted
Ramzay Frequent Visitor
Frequent Visitor

Re: Implementing in DAX SQL query with COUNT and GROUP BY

Thanks.  That is what I need.

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors