Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
MacyMolly
Helper II
Helper II

COUNT

Hi Everyone,

I'm  having a hard time how to figure this out by counting the column Value by Region. As you can see below, total counts on each Value is the same. 

Your help is greatly appreciated.

 

Table

MacyMolly_0-1629395381712.png

 

2 REPLIES 2
Anonymous
Not applicable

@MacyMolly 

 

 

You can try this calculated column:

Column =

CALCULATE(DISTINCTCOUNT('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Region]=EARLIER('Table'[Region])))

 

Is your data formed through Unpivot Columns? You don’t need this step or you can display the results you need.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

Best Regards,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

fhill
Resident Rockstar
Resident Rockstar

I think this is what you are trying to do...

 

Create a Measure for each Country, that will be the columns you need:  (Examples - repeat for every country)

Guyana = CALCULATE( COUNTX('Data Table','Data Table'[Value]), 'Data Table'[Region] = "Guyana")
Mexico = CALCULATE( COUNTX('Data Table','Data Table'[Value]), 'Data Table'[Region] = "Mexico")
 
To a new Table, add the 'Value' column, then each Measure in the order you desire, then add 'Value' again to the table and change the 2nd Value to 'Count'.  (Then rename to Total - Not shown below, but as a final step.)

fhill_1-1629397653716.png

 

Here's the raw data and final result...

fhill_0-1629397592371.png

 

 

 

 




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.