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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Use a Column To Count Unique Entries In A Column Within Another Table

All,

 

I need some help. I am trying to count the number of unique values in a Column from one table and have them entered into a new table that has a list of each unique value in column A of a new table. My solution is coming up incorrect right now.

 

Here is an example Column from the data set:

Asset - Use
Academic
Other
Academic
Multipurpose
Academic

 

Now I made a new table with two columns, the first brings out a simple list of these Text lables. I would like to second to count the number of each Asset - Use label

Asset - UseSample Size
Academic3
Other1
Multipurpose1

 

My expression is currently only giving me 1's in each row. Here it is:

Asset_Use_Sample_Size = COUNTROWS(FILTER(ALL('Asset (2)'[Asset - Use]), EXACT(Asset_Use_Summary_Table[Distinct Asset Use Labels], 'Asset (2)'[Asset - Use])))
 
I cant figure out what I am doing wrong any help would be much appreciated.

Thanks,
Jarrod
1 ACCEPTED SOLUTION
TheoC
Super User
Super User

Hi @Anonymous 

 

TotalCount = 

VAR _TotalCount = CALCULATE ( COUNTROWS ( 'tbl_AssetFreq' ) , FILTER ( 'tbl_AssetFreq' , 'tbl_AssetFreq'[AssetFrequency] = 'tbl_AssetCategory'[Asset - Use] ) )

RETURN

_TotalCount

 

TheoC_0-1634090915862.png

No relationship required in the above. The "tbl_AssetFreq" is simply the below:

TheoC_1-1634090967877.png

Hope this helps 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you @TheoC  that helped big time!

TheoC
Super User
Super User

Hi @Anonymous 

 

TotalCount = 

VAR _TotalCount = CALCULATE ( COUNTROWS ( 'tbl_AssetFreq' ) , FILTER ( 'tbl_AssetFreq' , 'tbl_AssetFreq'[AssetFrequency] = 'tbl_AssetCategory'[Asset - Use] ) )

RETURN

_TotalCount

 

TheoC_0-1634090915862.png

No relationship required in the above. The "tbl_AssetFreq" is simply the below:

TheoC_1-1634090967877.png

Hope this helps 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.