Filter Dataset

I originally was looking for a fix for the below (filter by subscription start date) but at this point would take help with alternatives (such as filtering by badge) if that is easier.


I want to filter what is shown in the repeaters on a page based on the member’s paid subscription start date being greater than or equal to the paidMonth date field in the dataset record. I have searched and searched and cannot seem to find anything that works. This is one of the pieces of code I have tried. I have verified that ‘paidMonth’ is the field key of the field in the dataset. What am I doing wrong? Thanks in advance for your help.

import wixUsers from 'wix-users';
import wixData from 'wix-data';

$w.onReady(function () {

    $w('#listRepeater').collapse(); //collapse repeater until filter is complete

    if (wixUsers.currentUser.loggedIn) {
        if (wixUsers.currentUser.getPricingPlans) {
            wixUsers.currentUser.getPricingPlans()
                .then((pricingPlans) => {
                    let firstPlan = pricingPlans[0];
                    let startDate = firstPlan.startDate

                    $w('#dataset1').setFilter(wixData.filter()
                        .ge('paidMonth', startDate))
                });

            $w('#listRepeater').expand(); //expand repeater
        }
    }
});