cancel
Showing results for 
Search instead for 
Did you mean: 
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
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!