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
Anonymous
Not applicable

Trying a pivot table from multiple tables in power bi

I have two tables  same columns but different years. It consist of Month, week and qty for 2021 and 2020.

when I try to create a single table to have both quantities for 2021 n 2020 in the same table it gives me the same value for each row.

JA_0-1618520874245.png

 

can someone please help me around the dax formulas.

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

 Hi, @Anonymous 

I’m not very sure if your data is only as much as in the example, whether your data contains a date column,

if there is a date column, you can try to extract the specific day in the date, and then the three columns (MonthOutbound and OutboundWeek and day column) combined into a unique key value column. so we could try to establish a one-to-one relationship between the two tables, and then the results can be displayed correctly. The key to the problem is to get the unique key

I also provide a sample data for reference.

In my data, because the same date in different years may be different weeks, there are data mismatched rows

 

Please check my sample for details.

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

Best Regards,
Community Support Team _ Zeon Zheng
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

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

 Hi, @Anonymous 

I’m not very sure if your data is only as much as in the example, whether your data contains a date column,

if there is a date column, you can try to extract the specific day in the date, and then the three columns (MonthOutbound and OutboundWeek and day column) combined into a unique key value column. so we could try to establish a one-to-one relationship between the two tables, and then the results can be displayed correctly. The key to the problem is to get the unique key

I also provide a sample data for reference.

In my data, because the same date in different years may be different weeks, there are data mismatched rows

 

Please check my sample for details.

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ryan_mayu
Super User
Super User

@Anonymous 

i think you need to merge the tables to combine data

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-shape-and-combine-data

 





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

Proud to be a Super User!




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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.