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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How can I calculate how many numbers are in the table

Hi,

 

How can I calculate how many numbers are  in the table

Nik_lidsk_0-1670588557982.png

Clients are in rows

ActiveSale_mnth = CALCULATE(DISTINCTCOUNT('Data'[Date]),'Data'[Sale] > 0)

 

I am trying to get a table like

10 - 250

9 - 114

8 - 80...

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous 

You can use the countx() function

e.g:Measure 2 = COUNTAX(FILTER(ALLSELECTED('Table (2)'),[Num]=SELECTEDVALUE('Table (2)'[Num])),[Num])

vxinruzhumsft_0-1670823338421.png

 

For details, please refer to the following links:

COUNTX function (DAX) - DAX | Microsoft Learn

If the above does not meet your needs, can you provide some sample data?

 

 Best Regards,

Yolo Zhu

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @Anonymous 

You can use the countx() function

e.g:Measure 2 = COUNTAX(FILTER(ALLSELECTED('Table (2)'),[Num]=SELECTEDVALUE('Table (2)'[Num])),[Num])

vxinruzhumsft_0-1670823338421.png

 

For details, please refer to the following links:

COUNTX function (DAX) - DAX | Microsoft Learn

If the above does not meet your needs, can you provide some sample data?

 

 Best Regards,

Yolo Zhu

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

AbbasG
Memorable Member
Memorable Member

@Anonymous  can you share a little bit more information, including desired output?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.