How do a get a count of rows that have a value greater than 0? Example below. The last column is what we are trying to generate.
Name 2024-02-06 2024-02-08 2024-02-13 2024-02-15 Count_Of_Rows_with_Data Pablo 1 0 1 0 2 Eli 0 0 0 0 0 Jenna 1 0 0 0 1 Chad 1 0 5 0 2
| eval Count_Of_Rows_With_Data=0
| foreach 20*
[| eval Count_Of_Rows_With_Data=if('<<FIELD>>' > 0, Count_Of_Rows_With_Data+1, Count_Of_Rows_With_Data)]
Alternatively, without having to know the names of the fields
| untable Name Date value
| appendpipe
[| stats count(eval(value > 0)) as value by Name
| eval Date="Count_Of_Rows_With_Data"]
| xyseries Name Date value
| eval Count_Of_Rows_With_Data=0
| foreach 20*
[| eval Count_Of_Rows_With_Data=if('<<FIELD>>' > 0, Count_Of_Rows_With_Data+1, Count_Of_Rows_With_Data)]
Perfect. Thank you!