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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
chernetsovalex
New Member

How can i create table with list from other table and date with group by month

Hello.

I have 2 tables:

1 table with dates with group by month:

let
    Years = Table.FromList({2018..2019}, Splitter.SplitByNothing(), null,null, ExtraValues.Error),
    AddMonth = Table.AddColumn(Years, "Month", each {1..12}),
    ShowMonths = Table.ExpandListColumn(AddMonth, "Month"),
    CreateDate = Table.AddColumn(ShowMonths, "Date", each #date([Column1],[Month],1))
in
    CreateDate

2 table with product list:

http://prntscr.com/occ6ne

 

How can i change 1 table to create a table of such a structure?

Date | Product list

1.01.18 | Diesel DZ100

1.01.18 | Diesel DZ101

1.01.18 | ......Products from table 2 list

1.01.18 | Diesel DZ999

1.02.18 | Diesel DZ100

1.02.18 | Diesel DZ101

1.02.18 | ......Products from table 2 list

1.02.18 | Diesel DZ999

Аnd so on

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @chernetsovalex ,

 

Go to the Table1 and add custom column with the following code:

 

Table2[Name]

This will give a list column then just click on Expand to new rows and the result is date and products.

 

check example attach.

 

Regards,

MFelix

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @chernetsovalex ,

 

Go to the Table1 and add custom column with the following code:

 

Table2[Name]

This will give a list column then just click on Expand to new rows and the result is date and products.

 

check example attach.

 

Regards,

MFelix

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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