Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hi everyone,
Currently, I have a column that contains distinct values, as such:
| 10007 |
| 7249 |
| 59 |
| 7882 |
| 11005 |
I would like to add another column of a repeating sequence, for each distinct value from the first column:
| 10007 | 2023 |
| 10007 | 2024 |
| 10007 | 2025 |
| 7249 | 2023 |
| 7249 | 2024 |
| 7249 | 2025 |
etc...
How can i make this kind of table?
Thanks
Solved! Go to Solution.
@Ori_I13 ,
The CROSSJOIN function will work for you:
ValuesNew = CROSSJOIN( 'Values',
UNION(
ROW("Sequence", 2023),
ROW("Sequence", 2024),
ROW("Sequence", 2025)))
'Values' is the name of your first table.
You can replace the UNION part with the name of a second table if you have many more values than the 3 you have shown in your example.
Regards,
I know it's been asked a while ago, but I came across this today, and there will be people asking this question again.
The quickest way if there aren't many values (like in your example only 2023, 2024 and 2025) is to add a list of these values as a new column and expanding it.
Otherwise as paladin21 suggested below, merge it from a separate table. That gives you flexibility to change the numebrs in source file instead of the query.
You are a genius thank you very much
I would use the Merge Queries option in Power Query (https://learn.microsoft.com/en-us/power-query/merge-queries-overview). To do so, I'd create an auxiliar column with a constant in the main table and a second table with said constant in the first column and the sequence in the second column. Then merge the tables using the constant as key and expand the sequence and delete the auxiliary column. This is a graphic sequence of actions to achieve it and the code for the main table.
@Ori_I13 ,
The CROSSJOIN function will work for you:
ValuesNew = CROSSJOIN( 'Values',
UNION(
ROW("Sequence", 2023),
ROW("Sequence", 2024),
ROW("Sequence", 2025)))
'Values' is the name of your first table.
You can replace the UNION part with the name of a second table if you have many more values than the 3 you have shown in your example.
Regards,
Thank you very much!
Worked like a charm
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 58 | |
| 42 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 122 | |
| 118 | |
| 38 | |
| 36 | |
| 29 |