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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
HenryJS
Post Prodigy
Post Prodigy

Data Restructure: New Column

Hi all,

 

I have two tables (below)

 

I would like to create new columns in Table 1. One for each ''Placements Rate Name" in table 2.

 

The desired outcome is at the bottom. This has two new columns.

 

Table 1 

Placement ID
1512
1513
1514

 

 

Table 2

Placement IDPlacements Rate NamePay Rate
1512Standard Day Rate430
1512Shifts Weekend350
1513Standard Day Rate430
1513Shifts Weekend350
1514Standard Day Rate430
1514Shifts Weekend350

 

 

TABLE 3 - Desired Outcome

Placement IDStandard Day RateShifts Weekend
1512430350
1513430350
1514430350
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@HenryJS , Try new column in Table 1

Standard day rate = maxx(filter(table2,table2[Location ID] =table1[Location ID] && table2[Location rate name] ="Standard day rate"),table2[Payment rate])
Weekend Shifts = maxx(filter(table2,table2[Location ID] =table1[Location ID] && table2[Location rate name] ="Weekend Shifts"),table2[Payment rate])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@HenryJS , Try new column in Table 1

Standard day rate = maxx(filter(table2,table2[Location ID] =table1[Location ID] && table2[Location rate name] ="Standard day rate"),table2[Payment rate])
Weekend Shifts = maxx(filter(table2,table2[Location ID] =table1[Location ID] && table2[Location rate name] ="Weekend Shifts"),table2[Payment rate])

@amitchandak is there a way of doing this without stating the 'Rate Name'?

 

So it just createst a new column for each different string in the rate name column?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.