Count items across different calculated fields and removing duplicates

Hello team,

I am trying to do the following:

  1. count all the (string) values with field1= A and field2 = B

distinct_countIf({apn_opp_opportunity_identifier__c}, {apn_opp_estimated_customer_biz_unit__c}=‘CS’ AND {apn_opp_estimated_customer_geo__c}=‘EMEA’)

  1. counts all the (string) values with field3= C + field4 = D + Field5 = E

distinct_countIf({apn_opp_opportunity_identifier__c}, {v_customer_type}=‘CS’ AND {v_geo__c} = ‘EMEA’ AND {v_biz_unit__c} = ‘AGS’)

  1. count the items resulting from point 1 + point 2 but remove the potential duplicates, in order to obtain a # as the result.

This is what I dont know how to do. I’ve tried using distinct count/sum/count but I fail all the time :frowning:

Can you kindly point me in the right direction?

Thank you,
Ginevra

Hi @ginevrap,

Can you do a distinct count using OR between the conditions in #1 and #2?

distinct_countIf(
	{apn_opp_opportunity_identifier__c}, 
	({apn_opp_estimated_customer_biz_unit__c}='CS' AND {apn_opp_estimated_customer_geo__c}='EMEA') OR ({v_customer_type}='CS' AND {v_geo__c} = 'EMEA' AND {v_biz_unit__c} = 'AGS')
)

Hi @David_Wong,

Thank you for your reply! I think this could work. I will test it out. Thanks again!

Hi @ginevrap. Did this solution work for you? I am marking this reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the QuickSight Community!