[SOLVED] Dataset getTotalCount not working?

I have a filtered DataSet on a page, showing only items which have a boolean “Show” set as true
The dataset works perfectly when showing the items through a repeater, but getTotalCount returns 0 without regard to the actual number

$w(‘#text7’).text = $w(‘#dataset1’).getTotalCount().toString()

Same goes when I tried to query.find or query.count
What am I doing wrong?

Hi

Are you placing the .getTotalCount() under the Dataset’s onReady function?

Post your entire code here

What a quick, perfect fix
Thank you!