Inline count and COUNT() are 0 despite entries being visible

generativegeorg_0-1705085054449.png
What are some reasons entries would show up here but the count and using COUNT() result in zero regardless of the number of visible entries that show up?

Here is the formula for the ref list column. Its referencing some lookup tables.

 

 

 

SELECT(RoleDocLookup[Document ID], 
  AND(
    IN([Role ID], [Related RolePersonLookups][Role ID]),
    NOT(IN([Document ID], [Related PersonDocLookups][Document ID]))
  )
)

 


For context:

What it does is look at the roles assigned to a person and the documents assigned to those roles.
It then filters out the document's they person has already been trained on and outputs the documents.

Tables:
Approved Documents (document id, name, approval date....)
Personnel (employee id, name...)
Roles (role id, role, description)
PersonRoleLookups (lookup id, role id, employee id)
RoleDocLookups (lookup id, role id, document ID)
PersonDocLookups (lookup id, employee id, document id)
when a training event is complete, personDocLookups are generated

Solved Solved
0 7 180
1 ACCEPTED SOLUTION

So ended up trying a bunch of things, interestingly I could sometimes get the count to be accurate but with no rows visible in the inline table OR get the rows to show correctly but with a count of zero. Ultimately this is the only thing that worked:

First I created a [Roles Text] column to get a list of related roles as text:

{TEXT([Related RolePersonLookups][Role ID])}

 Then I referenced this in the [Docs to Learn] column:

SELECT(RoleDocLookup[Lookup ID],
  AND(
    IN(TEXT([Role ID]), [Roles Text]),
    NOT(IN([Document ID], [Docs Trained][Document ID]))
  )
)

View solution in original post

7 REPLIES 7

Hey,

my bet would be a missing DOC ID or else the AND condition filters it out

if the id was missing, wouldn't the doc(s) not show up at all?

If you have modified the system generated REF_ROWS() virtual column and its formula, it can ruin the calculation. The system generated virtual column is quite sensitive and you should keep it as it is and create a new one for your own purpose. This can be one reason.

 

If they were modified can they be fixed to work again?

I need to show the slice's view I had modified it i think.
It may be because some of the 'related' columns are referencing a slice...

generativegeorg_0-1705352394413.png
I just tried to put the related columns back to RolePersonLookup , etc
and created new columns to reference the slice in order to get the views.

 

Change the Ref column to text type and save. That will delete the existing system generated virtual column. Then change it back to Ref and save, and the system generates it again.

So ended up trying a bunch of things, interestingly I could sometimes get the count to be accurate but with no rows visible in the inline table OR get the rows to show correctly but with a count of zero. Ultimately this is the only thing that worked:

First I created a [Roles Text] column to get a list of related roles as text:

{TEXT([Related RolePersonLookups][Role ID])}

 Then I referenced this in the [Docs to Learn] column:

SELECT(RoleDocLookup[Lookup ID],
  AND(
    IN(TEXT([Role ID]), [Roles Text]),
    NOT(IN([Document ID], [Docs Trained][Document ID]))
  )
)
Top Labels in this Space