Modern Table and SelectedItems not working
I believe there are two problems that showed up here.
In the first example, I am guessing you are trying to collect a value in a specific column? If so, then consider the following PowerFx instead
ClearCollect(
varSelectedInvoices
ForAll(OpenInvoices.SelectedItems, Faktura);
ForAll(AllInvoices.SelectedItems, Faktura)
);;
As for the CountRows, Microsoft has reported that the function doesn't work well for collections that update live. Try to use this PowerFx instead.
CountIf(OpenInvoices.SelectedItems, true)
CountIf(AllInvoices.SelectedItems, true)
Let me know if you have a more accurate result with these modifications.