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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Mister_PowerBI
Frequent Visitor

How to convert a table to one that is easier to work with

Hello everybody, 

 

I've been trying to find a solution for this problem for a while now, and I am not able to figure it out. I am hoping there are some Power BI Experts that can help me out with this one.

 

I have a table like below containing invoicing rules like this (with sample data): 

 

CustomerItemPriceFromTill (made with DAX)
JohnSpotify€ 1002-2022 05-2022
JohnNetflix€ 806-2022 
John Spotify€ 1205-2022 
ThomasSpotify€ 1002-2022 
ThomasNetflix€ 805-202206-2022
ThomasNetflix€ 1506-2022 

 

Because I find it very hard to analyse this date (especially because it is combined with other tables), I would like to convert this to a table like below for the coming two years: 

 

CustomerItemPriceMonth
JohnSpotify€ 1002-2022
JohnSpotify€ 1003-2022
JohnSpotify€ 1004-2022
JohnNetflix€ 806-2022
John Spotify€ 1205-2022
John Spotify€ 1206-2022
ThomasSpotify€ 1002-2022
John Spotify€ 1203-2022
John Spotify€ 1204-2022
John Spotify€ 1205-2022
John Spotify€ 1206-2022
ThomasNetflix€ 805-2022
ThomasNetflix€ 1506-2022

 

Based on this second table, it is way easier to combine the price for a specific month with the amount of users and some other data that affects the overall income. But I can't find a way to create table 2 based on the data in table 1.

 

Does anybody have any idea on how to add a table 2 to the datamodel?

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

Hi , @Mister_PowerBI 

Based on the data you provided, it's hard for me to see what rules table2 is based on.

And the [Till] i think it is created by the other table by dax like a calculated column .

vyueyunzhmsft_0-1675387498385.png

The first line is from February to February, but below there is only February to April. Is there a deviation in my understanding of your needs?

Second, if you want to generate a new table with start and end dates, you can use the GenerateSeries or calendar functions to generate a date table for each row, and then use crossjoin() to merge them.

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the right desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @Mister_PowerBI 

Based on the data you provided, it's hard for me to see what rules table2 is based on.

And the [Till] i think it is created by the other table by dax like a calculated column .

vyueyunzhmsft_0-1675387498385.png

The first line is from February to February, but below there is only February to April. Is there a deviation in my understanding of your needs?

Second, if you want to generate a new table with start and end dates, you can use the GenerateSeries or calendar functions to generate a date table for each row, and then use crossjoin() to merge them.

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the right desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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