Forum Discussion

ppgandhi11's avatar
ppgandhi11
Icon for Helper V rankHelper V
8 years ago
Solved

how can i do count on group by?

Hi,

 

I am a newbie in Power BI. How would i create a measure to do count on group by?

 

The equivalent SQL would be:

 

select department, count(department) from customers where location = 'US' group by deparment

 

department   count(department)

sales                 25

HR                    28

finance             30

:

:

 

 

Thanks.

 

 

  • I figured it out without creating the measure formula. In Pie chart I could get both the data points and it automatically shows the total by grouping. Thanks!

1 Reply

  • I figured it out without creating the measure formula. In Pie chart I could get both the data points and it automatically shows the total by grouping. Thanks!