Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
kp2
Contributor II
Contributor II

Using COUNT Function to Count if a row has a value from multiple different columns

Hi there, 

 

Trying to run a COUNT statement to take a running total of any rows that contain a value in two different columns, left an example below 

Col1 Col2 Col 3
London Cup  
Belfast   Cake

 

Ideally the total would be 4 and would be used for a KPI chart, I can create the code for one column but not more 

 

Any help would be greatly appreciated 

 

Labels (1)
1 Solution

Accepted Solutions
BenjaminT
Partner - Creator
Partner - Creator

Could you try something like this at the row-level:

aggr(count(Col1)+count(Col2)+count(Col3), Col1, Col2, Col3)

For the KPI, you could then just wrap this inside a sum().

(This assumes your blank values are NULLs)

View solution in original post

1 Reply
BenjaminT
Partner - Creator
Partner - Creator

Could you try something like this at the row-level:

aggr(count(Col1)+count(Col2)+count(Col3), Col1, Col2, Col3)

For the KPI, you could then just wrap this inside a sum().

(This assumes your blank values are NULLs)