Forum Discussion
Create a Panel Data table from two different tables
Hi all,
I have a table in which there are mapped different categories as follows:
I would like to create a new table (not a measure) that includes a date variable as follows:
Any idea how? I am fairly new to the app and definitely will appreciate any help.
Regards and thank you for your comments in advance!
Mario
Anonymous,
Try this solution.
1. Create a table with years:
2. Create a calculated table:
Table3 = CROSSJOIN ( VALUES ( Table1[Category] ), VALUES ( Table2[Year] ) )Result:
Hi Anonymous
I'm a bit confused as to why ID 1 has become 2017?
If you want to just add a date to the table you could consider using CROSSJOIN()
Let's say you have a date table as the following:
and then another table like this
When a new table is created using CROSSJOIN()
New Table = CROSSJOIN('Table','Date table')Result.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- DataInsightsSuper User
Anonymous,
Try this solution.
1. Create a table with years:
2. Create a calculated table:
Table3 = CROSSJOIN ( VALUES ( Table1[Category] ), VALUES ( Table2[Year] ) )Result:
- v-chenwuz-msftCommunity Support
Hi Anonymous
I'm a bit confused as to why ID 1 has become 2017?
If you want to just add a date to the table you could consider using CROSSJOIN()
Let's say you have a date table as the following:
and then another table like this
When a new table is created using CROSSJOIN()
New Table = CROSSJOIN('Table','Date table')Result.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.