Hello @thecuon119, I think to get the solution you are looking for you will want to break this up into 2 fields.
Rather than using distinct_countIf, create a calculated field ifelse statement that will return the Transactions Publisher field or NULL. I’ll call it Transactions Calc to reference.
Then you can make a second calculated field where you use the result of the ifelse statement to manually make the percentage: distinct_count({Transactions Calc})/sum({mức thu nhập tích luỹ})
Or if the distinct count and sum need to be partitioned you can do this: distinctCountOver({Transactions Calc}, [{Partition Field}])/sumOver({mức thu nhập tích luỹ}, [{Partition Field}])
When you are trying to use different types of aggregations to get your expected result, it is often better to change the method to avoid aggregation errors. I hope this helps lead you to a working solution!