Forum Discussion

AC_DATA's avatar
AC_DATA
Frequent Visitor
4 years ago
Solved

Return dynamically sized sample based on row count from table filtered by user-selected dates

I have a complex request to be able to select a sample of data for auditing based on user-selected dates. My current approach is to have a date slicer so the user can select the date range and create...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi AC_DATA ,

     

    Use count() function to calculate the count rows of filtered table and use this count * 10%. Then use this number in the SAMPLE() function. This number could be a decimal number, you could use roundup() or rounddown() function to make it a whole number.

     

    Best Regards,

    Jay