I've attached a snapshot of my data - I'm looking to count how many shipping addresses a Partner ID has in a list of various Partner IDs.
In the image the power BI formula I need is:
- For Partner ID# PUS00000111 to show it has 14 'TRUE' shipping address values
- For Partner ID# PUS00000342 to show it has only 1 'TRUE' shipping address
I have come up with two formulas that are close but both are giving me incorrect values.
This one below is counting all 'TRUE' shipping address values for all Partner IDs, not just the 1 Partner ID in the row (I can't get it to just count for that row's Partner ID).
It is showing incorrect counts for the example Partner #s above - it is showing 15 (count of 'TRUE' shipping address values) for everything.
CALCULATE(COUNTROWS(t_b2b_na_partner_address),FILTER(t_b2b_na_partner_address,t_b2b_na_partner_address[SHIPPING_ADDRESS]="TRUE"),allexcept(t_b2b_na_partner_address,t_b2b_na_partner_address[PARTNER_ID]))
Any help would be amazing to figure out what can work to get the above counts needed - thank you!!
In the image the power BI formula I need is:
- For Partner ID# PUS00000111 to show it has 14 'TRUE' shipping address values
- For Partner ID# PUS00000342 to show it has only 1 'TRUE' shipping address
I have come up with two formulas that are close but both are giving me incorrect values.
This one below is counting all 'TRUE' shipping address values for all Partner IDs, not just the 1 Partner ID in the row (I can't get it to just count for that row's Partner ID).
It is showing incorrect counts for the example Partner #s above - it is showing 15 (count of 'TRUE' shipping address values) for everything.
CALCULATE(COUNTROWS(t_b2b_na_partner_address),FILTER(t_b2b_na_partner_address,t_b2b_na_partner_address[SHIPPING_ADDRESS]="TRUE"),allexcept(t_b2b_na_partner_address,t_b2b_na_partner_address[PARTNER_ID]))
Any help would be amazing to figure out what can work to get the above counts needed - thank you!!