Forum Discussion
Count Columns that don't contain zero
Hi vanessafvg,
>0 returns the same. Num Invoiced weeks should be 8 as there are 8 times (weeks) where [Visits_NoHrs] is not zero.
I want to count the weeks where [Visits_NoHrs] <> 0.
I get 1 rather than 8.
what does your data look like? can you post a screenshot?
what if you tried something liek this
Num Invoiced Weeks = CALCULATE(countrows(vw_PivotVisitsInvoiced), not(isblank(vw_PivotVisitsInvoiced[Visits_NoHrs]))
is the data blank or 0?
- android19 years ago
Post Patron
Hi,
Data is blank.
Result using your formula returning the same as mine.
- vanessafvg9 years ago
Community Champion
what is your data type on no of hours? is the row you posted below an example of what your date looks like in the tables at a detailed level?
what about, noofrows = calculate(countrows(vw_PivotVisitsInvoiced), vw_PivotVisitsInvoiced[Visits_NoHrs] > 0)
you need to provide more information otherrwise it will be very difficult to provide you with help based on the information you have given. It seems to me either the data type is not as expecvted or i am nto seeing the actually data as it is in the table. as a detail level.
- android19 years ago
Post Patron
[Visits_NoHrs] is Decimal Number, Format: General
I have the correct invoiced hrs for each week.
Some weeks have blank Invoiced Hrs & some have value. So what I'm trying to do is count the weeks that
have a value ie invoiced hrs not equal to blank.