Counting rows that have a value in a specific column

nadim_dayoub
Participant II

I am trying to come up with an expression that would count how many items I sold based on if there is a value in a column and if the Lot matched. I and doing this through a virtual column.

So I thought this would be the expression:

COUNT(CONTAINS(ISNOTBLANK(Inventory[Job Name]), [Lot] = [_THISROW].[Lot]))

but I am getting โ€œCOUNT function is used incorrectlyโ€

3X_7_4_748ac1e64503dc88239d65d2d8f9085ab7b7320e.png

Solved Solved
0 4 778
1 ACCEPTED SOLUTION

4 REPLIES 4

nadim_dayoub
Participant II

That is what I tried at first, but I got โ€œSELECT has invalid inputsโ€

This is what I tried before trying CONTAINS()

COUNT(SELECT(ISNOTBLANK(Inventory[Job Name]), ([Lot] = [_THISROW].[Lot]), TRUE))

Maybe I am trying too much or canโ€™t wrap my simple brain around it.

Thank you for saving me once again!

Top Labels in this Space