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

## Get total count of each distinct value

Hi all,

If I for example have a column of countries that might repeat and the list follows like this: Spain, Spain, Italy, Spain

I want to get the result that I take the number that a country appears in the column and divide it by total number. I have tried:

CountRows = DIVIDE(DISTINCTCOUNT('Report (7)'[Country]); COUNT('Report (7)'[Country]) )

Any suggestions? do I need a new column for that?
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III

## Re: Get total count of each distinct value

Hi @taudau1

1. Place 'Report (7)'[Country] in a table visual

2. Place this measure in the visual

```CountRows =
DIVIDE (
COUNT ( 'Report (7)'[Country] );
CALCULATE ( COUNT ( 'Report (7)'[Country] ); ALL ( 'Report (7)'[Country] ) )
)
```

That will give you a table with the number you're looking for, per country

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers

1 REPLY 1
Highlighted
Super User III

## Re: Get total count of each distinct value

Hi @taudau1

1. Place 'Report (7)'[Country] in a table visual

2. Place this measure in the visual

```CountRows =
DIVIDE (
COUNT ( 'Report (7)'[Country] );
CALCULATE ( COUNT ( 'Report (7)'[Country] ); ALL ( 'Report (7)'[Country] ) )
)
```

That will give you a table with the number you're looking for, per country

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers

## Helpful resources

Announcements

#### Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

#### 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?

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

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

#### Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors