Forum Discussion

Fali324's avatar
Fali324
Icon for Helper II rankHelper II
3 years ago
Solved

How can I count rows across different tables

Hi I want to count responses across 4 tables. 

These are my tables:
User - Username and Email

Q1 - Email, Document opened(Yes/No)
Q2 - Email, Document opened(Yes/No)
Q3 - Email, Document opened(Yes/No)
Q4 - Email, Document opened(Yes/No)

 

The tables are linked to User via Email.

 

I want to count for each user, across every Qtr the response "no" for the document opened column.

 

Any help will be much appricated. 

 

Thanks

  • Hi Fali324,

    You could use such a calculated column, for example: 

    In plain text:

    No Counter = 
    VAR CurrentEmail = [Email]
    RETURN 
        COUNTROWS ( FILTER ( Q1, [Email] = CurrentEmail && [Document opened] = "no" ) ) + 
        COUNTROWS ( FILTER ( Q2, [Email] = CurrentEmail && [Document opened] = "no" ) ) + 
        COUNTROWS ( FILTER ( Q3, [Email] = CurrentEmail && [Document opened] = "no" ) ) +
        COUNTROWS ( FILTER ( Q4, [Email] = CurrentEmail && [Document opened] = "no" ) )

    Best Regards,

    Alexander

    My YouTube vlog in English

    My YouTube vlog in Russian

1 Reply

  • Hi Fali324,

    You could use such a calculated column, for example: 

    In plain text:

    No Counter = 
    VAR CurrentEmail = [Email]
    RETURN 
        COUNTROWS ( FILTER ( Q1, [Email] = CurrentEmail && [Document opened] = "no" ) ) + 
        COUNTROWS ( FILTER ( Q2, [Email] = CurrentEmail && [Document opened] = "no" ) ) + 
        COUNTROWS ( FILTER ( Q3, [Email] = CurrentEmail && [Document opened] = "no" ) ) +
        COUNTROWS ( FILTER ( Q4, [Email] = CurrentEmail && [Document opened] = "no" ) )

    Best Regards,

    Alexander

    My YouTube vlog in English

    My YouTube vlog in Russian