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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
cuongtrinh2197
Frequent Visitor

Need urgent help please!!!

Hi, can someone show me the way to bring the field Customer part number to the visual table?

 

My relationship looks fine but the error happened when I tried to bring the customer part number to the table, If the customer doesn't have a specific part number for the part they bought, the return will be our part number.

 

Please find my attachment for details:
https://shorturl.at/uI99n

1 ACCEPTED SOLUTION

@cuongtrinh2197 

pls see if this is what you want

 

Measure =
VAR _cpn=maxx(FILTER(fCustProduct,fCustProduct[Part number]=max(fSales[Part number])&& fCustProduct[Customer]=max(fSales[Customer])),fCustProduct[Customer Part Number])
return if (_cpn="",max(fSales[Part number]),_cpn)
 
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
ryan_mayu
Super User
Super User

i think you need to improve the data model. 

Now you can try to create a column

 

customer part number = maxx(FILTER(fCustProduct,fCustProduct[Part number]=fSales[Part number]),fCustProduct[Customer Part Number])
 
11.PNG
 
then add this column to the table visual
 
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Many thanks Ryan,
Is there any chance for me to use your syntax acting as a measure?
My company just empowered me to do the measure and visual table without modifying the dataset such as add a new column,...

pls try this

Measure = maxx(FILTER(fCustProduct,fCustProduct[Part number]=max(fSales[Part number])),fCustProduct[Customer Part Number])
 
11.PNG
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Sorry Ryan I just checked again, if you can see the measure return to the swrong result
For example, line 1, customer 1 sale order but the return value in the measure column is the part number of customer 2

Ryan, the measure return the wrong value

@cuongtrinh2197 

pls see if this is what you want

 

Measure =
VAR _cpn=maxx(FILTER(fCustProduct,fCustProduct[Part number]=max(fSales[Part number])&& fCustProduct[Customer]=max(fSales[Customer])),fCustProduct[Customer Part Number])
return if (_cpn="",max(fSales[Part number]),_cpn)
 
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.