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
sdhn
Responsive Resident
Responsive Resident

SCORE CARD CALC.

Hello All,

 

I am using Score Card to calculate rows counts as:

I have 5 files , below code is working good for 4 files correctly.

 

UTRAlerts = COUNTROWS(ALLSELECTED(UTRAlerts))-1
 
this file has two rows but it is displaying 0.
 
sdhn_0-1638911334466.png

 

 

Thanks 

 

1 ACCEPTED SOLUTION

The most likely reason is that the table is filtered. Try hovering over the filter icon to see if this is the case.

 

You can also check if COUNTROWS ( ALL ( UTRAlerts ) ) - 1 is any different. If this also returns 0, then your table really only does have one row.

View solution in original post

4 REPLIES 4
AlexisOlson
Super User
Super User

ALLSELECTED is a complicated function. I'd recommend eliminating it entirely in this case unless there is some reason you need it (please explain if this is the case):

UTRAlerts = COUNTROWS ( UTRAlerts ) - 1

This will take into account slicers and filters, so I think it should behave as you were expecting the version with ALLSELECTED to.

sdhn
Responsive Resident
Responsive Resident

Same out put

sdhn_0-1638912150563.png

UTRAlerts = COUNTROWS( UTRAlerts ) -1

The most likely reason is that the table is filtered. Try hovering over the filter icon to see if this is the case.

 

You can also check if COUNTROWS ( ALL ( UTRAlerts ) ) - 1 is any different. If this also returns 0, then your table really only does have one row.

sdhn
Responsive Resident
Responsive Resident

UTRAlerts = COUNTROWS ( ALL ( UTRAlerts )) - 1  - Worked ,  Thanks fo ryour help.

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.