I am trying to create some logic based on the result of a countIf function but for some reason the countif function is returning a 0 result even though it should be returning a count of 4 for the particular record I am looking at, but if I use the same operation and combine a CountRow and Filter formulas, it returns the correct result. Any ideas on why CountIF is not working even though it is the same exact condition? These formulas are entered into fields in a gallery.
CountRows(Filter('[dbo].[tblData_VendorMasterSSPaymentTerms]',ThisItem.VMSSPayTermsCLM_ContractID=VMSSPayTerms_AribaContractID))
CountIf('[dbo].[tblData_VendorMasterSSPaymentTerms]',ThisItem.VMSSPayTermsCLM_ContractID=VMSSPayTerms_AribaContractID)