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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Counting values

Hi everyone, I have the following slicer and table:

featleyd_0-1605781718790.pngfeatleyd_1-1605781743254.png

Given that my user could alter this table with the slicer, I'm trying to write a measure to calculate the number of rows contained in the table visual, for the example above, I'd be looking for 21.

 

Can anyone help?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Found the solution, COUNT should be DISTINCTCOUNT as there are multiple values for some days.

Thanks all

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , countrows(Table)

or

count(Table[Day])

 

if days from different table

calculate(count(Day[Day]), not(isblank(Table[login time])))

Anonymous
Not applicable

Hi @amitchandak 

 

featleyd_0-1605782704445.png

As you can see, I got a result of 731 instead of 21

 

The DAX i entered was this:

featleyd_1-1605782787519.png

I can't fathom why I can't just simply count the rows of the visuals.

Anonymous
Not applicable

Found the solution, COUNT should be DISTINCTCOUNT as there are multiple values for some days.

Thanks all

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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