0

formula to count unique records

I want to write a formula that counts to number of rows based on a unique field (Id).

 

E.g.

table

ID     Date          Amt

1       2/2/2020   100.00

2       2/1/2020   100.00

1       3/1/2020    50.00

 

I want to count the number of unique ID fields, so the result of the formula would be the value 2

4 replies

null
    • Sean
    • 4 yrs ago
    • Reported - view

    Try this...

     

    count(unique((select YourTable).ID))

    • d65pm
    • 4 yrs ago
    • Reported - view

    Perfect, thank you 

    • ninox
    • 4 yrs ago
    • Reported - view

    I have a similar requirement. I have several dates in the same week and I want to know the total number of weeks I have dates for.

    I have a field with the week number already but cannot seem to adjust the coding to work.

     

    advice would be helpful. Thanks in advance.

    • Sean
    • 4 yrs ago
    • Reported - view

    If I understand you correctly, I think you would just replace “ID” with your week number field name.