Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AnetShe
Regular Visitor

Concatenate Rows with Condition - Help Please!

From the below data set I need all of a Partner IDs active (TRUE) email addresses in one cell.

Using dax I'm very close but cannot figure out how to add the condition to output only 'TRUE' (active) emails from the enabled column.  (shown in wanted results table below).

Here is what I have so far that is outputting all of a partners emails (and my table name is 

t_b2b_na_partner_user):
= calculate(CONCATENATEX(t_b2b_na_partner_user,t_b2b_na_partner_user[EMAIL],"; "),ALLEXCEPT(t_b2b_na_partner_user,t_b2b_na_partner_user[PARTNER_ID]))
 
Any help adding the condtion of 'TRUE' from the enabled column would be amazing - THANK YOU!!

 

Current Data:

 

Partner_IDEmailEnabled
PCA00000054andrea@syoga.comTRUE
PCA00000063ahurlburt@fitness.comTRUE
PCA00000063nkeane@fitness.comFALSE
PCA0000007teginpopowich@hotmail.comTRUE
PCA0000007manager@bodymindcentre.comTRUE



Wanted Result with added Partner Emails column:

 

Partner IDEmailEnabledPartner Emails
PCA00000054andrea@syoga.comTRUEandrea@syoga.com
PCA00000063ahurlburt@fitness.comTRUEahurlburt@fitness.com
PCA00000063nkeane@fitness.comFALSEahurlburt@fitness.com
PCA0000007teginpopowich@hotmail.comTRUEteginpopowich@hotmail.com & manager@bodymindcentre.com
PCA0000007manager@bodymindcentre.comTRUEteginpopowich@hotmail.com & manager@bodymindcentre.com
1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @AnetShe 

CALCULATE (
    CONCATENATEX ( t_b2b_na_partner_user, t_b2b_na_partner_user[EMAIL], "; " ),
    ALLEXCEPT ( t_b2b_na_partner_user, t_b2b_na_partner_user[PARTNER_ID] ),
    t_b2b_na_partner_user[enabled] = "TRUE"
)

where it's assumed that [enabled] is if type text. If it's boolean use  = TRUE( ) for the comparison

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

View solution in original post

2 REPLIES 2
AnetShe
Regular Visitor

@AlB - this solved it!! My data is text and "TRUE" worked great - thanks so much

AlB
Super User
Super User

Hi @AnetShe 

CALCULATE (
    CONCATENATEX ( t_b2b_na_partner_user, t_b2b_na_partner_user[EMAIL], "; " ),
    ALLEXCEPT ( t_b2b_na_partner_user, t_b2b_na_partner_user[PARTNER_ID] ),
    t_b2b_na_partner_user[enabled] = "TRUE"
)

where it's assumed that [enabled] is if type text. If it's boolean use  = TRUE( ) for the comparison

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.