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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
nirrobi
Helper V
Helper V

Sales table with 2 CustomerID columns

Hi,

 

I have sales table with 2 customers column (actual + notify)

and client table - table below.

 

I need to show table with those 2 customers and the salesID + amount - table below.

 

I have 2 connection between the sales and customer table (nofity in active)

 

thanks in advenced.

 

 

 

SalesIDClientIDNotifyIDAmount

1001000100055
1011001100966
1021000100544
1031002100033
104100310102

 

 

And Customer table:

ClientIDClientName

1000AAA
1001BBB
1002CCC
1003DDD
1009EEE
1005FFF
1010GGG

 

I need to show one table as the one below:

SalesIDAmountClientNameNotifyName

10055AAAAAA
10166BBBEEE
10244AAAFFF
10333CCCAAA
1042DDDGGG

 

I have 2 connection between the sales and customer table (nofity in active)

11111.JPG

2 ACCEPTED SOLUTIONS

@nirrobi

 

As MEASURES

 

Notify_Name =
CALCULATE (
    FIRSTNONBLANK ( Customer[ClientName], 1 ),
    CROSSFILTER ( Sales[NotifyID], Customer[ClientID], BOTH ),
    USERELATIONSHIP ( Sales[NotifyID], Customer[ClientID] )
)

Regards
Zubair

Please try my custom visuals

View solution in original post

@nirrobi

 

Please see the file attached


Regards
Zubair

Please try my custom visuals

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

HI @nirrobi

 

You can use these calculated columns

 

ClientName =
RELATED ( Customer[ClientName] )
NotifyName =
CALCULATE (
    VALUES ( Customer[ClientName] ),
    FILTER ( Customer , Customer[ClientID] = Sales[NotifyID] )
)

Regards
Zubair

Please try my custom visuals

@nirrobi

 

As MEASURES

 

Notify_Name =
CALCULATE (
    FIRSTNONBLANK ( Customer[ClientName], 1 ),
    CROSSFILTER ( Sales[NotifyID], Customer[ClientID], BOTH ),
    USERELATIONSHIP ( Sales[NotifyID], Customer[ClientID] )
)

Regards
Zubair

Please try my custom visuals

@nirrobi

 

Please see the file attached


Regards
Zubair

Please try my custom visuals

Many thanks for your help!!!

Much appriciated.

 

I notice that you can't use the ClientName from the Customer table - make all the row duplicare - see attached pic.

 

please correct me if I wrong.

 

thanks again.

 

Nir

1111.JPG

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.