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
cmckernan93
Frequent Visitor

How to handle a number field when primary key/linked up values values duplicate

Hello 

 

I have a proablem which causes an error with my powerBi report, for field 'trading week' in my excel sheet which the powerbi is linked to i could generate reports for one year as for example there was only 1x 36 value but now i have 2 years adata the powerbi shows an error as there are now 2 weeks 36s - one in 2020 and one in 2021.

 

What is the best way to format the Excel trading week to allow power to accept both values, is it for xampole by using 36- 2020 or 36 - 2021 as the key field in excel.

 

dgdg.jpg

the below 2x tables will flag an error if i pu the data in yellow also as this is the same problem as above. 

 

fe.jpg

 

Untitled.jpg

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You're on the right track.  In addition to your week and year columns you need to create a clculated column "yearweek". you can format it any way you want but usually the parent value comes first, like "2021Wk03" or "2021Wk36".  And then you can use that composite key as your linking column.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

You're on the right track.  In addition to your week and year columns you need to create a clculated column "yearweek". you can format it any way you want but usually the parent value comes first, like "2021Wk03" or "2021Wk36".  And then you can use that composite key as your linking column.

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.