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

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

Reply
rogerk
Frequent Visitor

Conditional copy values into table / Table relations

I would like to plot work progress of varying items within a project over time, at specific report dates, as shown in the figure below but with x-axis labels in the date format coming from a separately imported data table.

rogerk_0-1642411478011.png

 

I have currently two related tables (n:n, Project - Project) that contain the data for multiple of the shown figures, i.e. multiple projects, with following columns:

 

ProjectReport Date

 

ProjectItemProgressReport Number

 

Every Project has a varying number of m-Items (lines in the figure) and n-Report Numbers (x-axis in the graph). Report numbers are enumerated from 1...n and the items are m-text values.

 

For every project I also have corresponding amount of n Report Dates. To I need to assign the dates to the report numbers in a way that the first date gets matched to report number 1, second to number two and last the n-th date to the n-th report,all the while considering that there are multiple projects in both tables.

 

Does anybody have a suggestion how I can achieve this?

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @rogerk ,

 

I create the following sample data.

 

vkkfmsft_2-1642646105762.png

vkkfmsft_1-1642646091151.png

 

Then add custom column in Table 2:

 

CustomColumn =
let 
   myfunction = (CurrentProject) => 
     let 
       SelectRows = Table.SelectRows(Table, each [Project] = CurrentProject) 
     in 
       SelectRows,
   Date = myfunction([Project]){[Report Number]-1}[Report Date]
in 
   Date

vkkfmsft_3-1642646154715.png

vkkfmsft_4-1642646303460.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @rogerk ,

 

I create the following sample data.

 

vkkfmsft_2-1642646105762.png

vkkfmsft_1-1642646091151.png

 

Then add custom column in Table 2:

 

CustomColumn =
let 
   myfunction = (CurrentProject) => 
     let 
       SelectRows = Table.SelectRows(Table, each [Project] = CurrentProject) 
     in 
       SelectRows,
   Date = myfunction([Project]){[Report Number]-1}[Report Date]
in 
   Date

vkkfmsft_3-1642646154715.png

vkkfmsft_4-1642646303460.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thank you, this works perfectly.

amitchandak
Super User
Super User

@rogerk , You should have a common project table and avoid n -n join

 

https://www.seerinteractive.com/blog/join-many-many-power-bi/

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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.

Top Kudoed Authors